An eigenvalue of graphs is called a main eigenvalue if it has an eigenvector the sum of whose entries is not zero.By studying the relationship between the main eigenvalue and the equitable partition of graphs,it gives some trees with exactly three main eigenvalues and computing method of main eigenvalues.