In recent days, data growth is enormous and tough to handle it, in an oragnised manner and in apt time. In data mining, wide range of researches are available for managing data effectively. Document clustering is a spirited zone in data mining and here our main objective is to assemble the related documents. In this paper, we generate an algorithm for clustering by means of Adaptive Pillar K-Means and Gaussian Firefly Algorithm. For determining the proper centroid in order to attain the proper clustered documents, Adaptive Pillar K-means algorithm is utilized. Subsequently, Gaussian firefly algorithm is exploited for the optimization process and also for enhancing the precision that results in reducing the sum of squared errors and computational time. Here, the performance of the proposed methodology is compared with various algorithms such as Genetic Algorithm, Ant colony optimization and gravity clustering. The attained results show the performance of the proposed methodology and the simulation results illustrated the betterment in quality with low sum of squared errors.