The broad, fertile Valle de Comayagua attracted settlers long before the Spanish arrived in the region in 1537. For centuries, the valley had been a bastion of the Lenca, but during the years before Columbus, Nahuatl-speaking migrants from central Mexico moved into the region, apparently coexisting peacefully with the original inhabitants. The attractions of the area were obvious and are further illustrated through the name Comayagua, which is thought to mean “abundance of food” in Maya.
It’s unclear exactly when the first conquistadors passed through the valley, but Alonso de Cáceres founded Santa María de Comayagua on December 7, 1537, under orders from Francisco Montejo. The first city was destroyed shortly thereafter by Indians in the region, who rose with Lempira in revolt against the Spaniards. In fact, the valley was the last bastion of Indian rebellion to be put down, holding out until the first months of 1539.
Comayagua  was reestablished the same year, and by 1557 the crown recognized it as a villa (city). Not long after, veins of silver were found nearby, further encouraging Spaniards to settle there. By 1573, Comayagua was the most important city in the province, surpassing Gracias a Dios. It was made the administrative capital of the colony, which it remained through the rest of the colonial period.
Comayagua was a center for intrigue and a target for attack during the wars of independence and Central American union. The town was pillaged and burned several times in the mid-19th century, most notably in 1837 by Guatemalan General José Justo Milla. When Honduras  was established as an independent country, Comayagua  was declared the capital. The rise of Tegucigalpa  in the late 19th century as a center for gold and silver production led to a bitter rivalry between the two cities, which was finally settled in 1880 when President Marco Aurelio Soto changed the seat of government to Tegucigalpa.
Since then—a black day for Comayagua—the city slid into a sort of genteel poverty, trying to retain the pretensions of a capital but without the economic or political power base. These days, Comayagua mostly survives on the valley’s agriculture and cattle industries, as well as on money derived from the nearby Palmerola Air Force Base and the new industrial park. The U.S. military presence in town is quite noticeable if you stick around for a couple of days; several ex-military personnel operate businesses in town.