Ant Colony Optimization (ACO) is a nature-inspired optimization algorithm which is motivated by ants foraging behavior. Due to its favorable advantages, ACO has been widely used to solve several NP-hard problems, including edge detection. Since ACO initially distributes ants at random, it may cause imbalance ant distribution which later affects path discovery process. In this paper an adaptive ACO is proposed to optimize edge detection by adaptively distributing ant according to gradient analysis. Ants are adaptively distributed according to gradient ratio of each image regions. Region which has bigger gradient ratio, will have bigger number of ant distribution. Experiments are conducted using images from various datasets. Precision and recall are used to quantitatively evaluate performance of the proposed algorithm. Precision and recall of adaptive ACO reaches 76.98 % and 96.8 %. Whereas highest precision and recall for standard ACO are 69.74 % and 74.85 %. Experimental results show that the adaptive ACO outperforms standard ACO which randomly distributes ants.