Auto-focusing was an important part of imaging automation. In order to improve the focus accuracy and reduce the time of auto-focusing,an auto-focusing algorithm combining image ambiguity and image clarity was presented. At first,in the severe defocused state,the correct search direction of focus-motor was determined by the value of image ambiguity. And then,the correct focus position was determined by the value of image clarity and the optimized mountain climbing servo. The results show that this method could reduce focus time and obtain the high focus accuracy.