In this paper, we first give the relation between the expansions of two Melnikov functions near a heteroclinic loop with two nilpotent cusps of order \(m_1\) and \(m_2\) ( \(m_i\in {\mathbb {Z}}^+\) ). Then, we derive a general condition for the existence of as many limit cycles as possible near the heteroclinic loop. Let \({\mathcal {H}}(n, m)\) denote the maximum number of limit cycles for the Liénard equation \(\ddot{x}+\varepsilon f(x)\dot{x}+g(x)=0\) with \(\deg {f}=n\) and \(\deg {g}=m\) . We prove that \({\mathcal {H}}(n, 7)\ge 2n-1 -2\!\left[ \frac{n+1}{8}\right] -\left[ \frac{n-1}{8}\right] \) for \(n\ge 1\) , where the limit cycles are all near a heteroclinic loop with two nilpotent cusps. Notably, this result improves the existing lower bound of \({\mathcal {H}}(n, 7)\) for \(n\ge 12\) .