With the larger Huaca del Sol it makes up the Huacas de Moche, the heart of the Moche capital at Cerro Blanco, which was lived in from the 1st to the 9th century AD. Its purpose was mainly ceremonial and religious, though it held burials too.

Spanish conquistadors partly destroyed and looted the Huaca del Sol in the seventeenth century, but the Huaca de la Luna escaped largely intact, and wind-blown sand later buried it and preserved its inner walls. Excavation began in the 1990s, following aerial photographic surveys in the late 1980s, and the World Monuments Fund has backed the documentation, stabilisation and conservation of what has been uncovered.

The complex consists of three platforms and several plazas. The biggest, Platform I, stands 30 metres high and grew in layers, with a new platform built over the old one roughly every 100 years for six centuries. To the north lies Plaza 1, a broad, low open space probably used for large crowds, where Recinto 1, a richly decorated building on a raised base, has murals of warriors leading prisoners. Plaza 2 looks over the same ground from a higher level, the linked Plazas 3A, 3B and 3C lie directly east of Platform I, and the smaller Platforms II and III stand beyond them.

The interior walls are covered by about 10,000 square metres of multicoloured murals painted with mineral pigments such as red hematite and white clay, as well as organic ones. The Moche god Ai-Apaec, also called Ayapec, a Muchik word meaning "all knowing", appears again and again. Many of the bricks carry one of 128 different marks that show which neighbouring community made them.

The temple was also a place of human sacrifice, and Platform I has given up several high-status burials. At the foot of a black rock by the eastern platform, archaeologists found the skeletons of adult men bearing signs of trauma and imprisonment; most were killed by a heavy blow to the head, and their bodies were thrown over the side into the patios and left unburied. A second group of sacrifices, killed with a clean cut to the neck, coincides with El Niño periods of flooding, and children were also offered, possibly when a temple was completed.