In this article, we study the expansion of the first Melnikov function appearing by perturbing an integrable and reversible system with a homoclinic loop passing through a nilpotent singular point, and obtain formulas for computing the first coefficients of the expansion. Based on these coefficients, we obtain a lower bound for the maximal number of limit cycles near the homoclinic loop. Moreover, as an application of our main results, we consider a type of integrable and reversible polynomial systems, obtaining at least 3, 4, or 5 limit cycles respectively.