In this letter, we propose the first algorithm to achieve the Heisenberg limit for learning an interacting N-qubit local Hamiltonian. After a total evolution time of O(ε−1), the proposed algorithm can efficiently estimate any parameter in the N-qubit Hamiltonian to ε error with high probability. Our algorithm uses ideas from quantum simulation to decouple the unknown N-qubit Hamiltonian H into noninteracting patches and learns H using a quantum-enhanced divide-and-conquer approach. The proposed algorithm is robust against state preparation and measurement error, does not require eigenstates or thermal states, and only uses polylog(ε−1) experiments. In contrast, the best existing algorithms require O(ε−2) experiments and total evolution time. We prove a matching lower bound to establish the asymptotic optimality of our algorithm.