One third of the world is infected with tuberculosis disease. The disease is diagnosed visually by laboratory technicians. In the microscopy diagnosis with hand-eye control, misdiagnosis rate is quite high. In microscopic imaging, by using computer aided automatic diagnosis methods, the disease is true diagnosed. The robustness of the automatic diagnosis methods depends on accurate segmentation of microscopic images. Image segmentation methods produce a special solution for several problems. In this study, Firefly algorithm based on swarm intelligence as a novel approach in microscopic imaging is proposed to segment images. In the proposed approach, an optimum threshold value in gray-level microscopic images is determined with proposed entropy based Firefly algorithm. Microscopic images are converted to binary format by using obtained optimum threshold value. Segmentation results are compared with expert-guided segmentation results. The performance ratio of segmentation is 96% obtained by using Firefly algorithm based on swarm intelligence.