In recent years, people have paid increasing attention to smart agriculture. Its core technology is to combine information technology such as computer vision with agricultural production. In agricultural production, the occurrence of pests and diseases can seriously affect agricultural production. Therefore, in agricultural production, the diagnosis and identification of agricultural pests and diseases is the key to improve crop yield. Traditional machine vision methods often rely on feature extraction and classifier design, lack of strong learning and generalization ability, and can not effectively control crop diseases and pests in a timely manner. In order to solve this problem, this paper designs an agricultural pest recognition system based on machine vision algorithm of fuzzy recognition theory, and applies it to agricultural pest recognition. Compared with the traditional machine vision method, this method has obvious advantages, and can effectively improve the monitoring and early warning ability of crop diseases and pests. The experimental results show that the highest recognition rate of the machine vision optimization algorithm based on fuzzy recognition theory is 98.06%, and the lowest recognition error rate is 5.83%. It can be seen that the machine vision recognition algorithm based on fuzzy recognition theory has good recognition effect and can be used in agricultural pest recognition system to help farmers carry out agricultural production and reduce economic losses caused by diseases and pests.