It has always been the focus of research as how to solve the resource distribution problem in cloud computing, and aiming at the weakness emerging in the monkey algorithm, i.e. too quick convergence speed and being easy to fall into local optimal, etc. the monkey algorithm is introduced in this paper. First, chaos algorithm and inverse learning are introduced into monkey algorithm to initialize the initial position of monkey swarm. Second, the improvement of climbing, watching and jumping in monkey algorithm has improved the convergence precision of this algorithm. After the test of classic function, algorithm in this paper has improved noticeably in performance compared with other intelligent algorithms. Cloudsim platform has proved that by applying algorithm in this paper to cloud computing, resource consumption has been greatly improved during completing tasks.