Montemayor is a municipality in the province of Córdoba, in the Andalusia region of southern Spain. It lies within the Guadalquivir valley area of the province, near the city of Córdoba.
According to the 2006 census (INE), Montemayor had a population of 3,936 inhabitants. The town is known for its castle, the Castillo de Montemayor, a fortress of Moorish origin that was later rebuilt and expanded after the Christian conquest of the region.