Herrera was already settled in the Roman times, as evidenced by the bathing complex proclaimed in 2007 an archeological zone of interest. The complex was located in the center of an array of estates scattered on a rich agricultural land watered by river Genil. First believed to belong to a Roman estate, the remains were identified as one of the few public baths found in the Province of Seville, The soil and stairs, as well a the swimming pools were made of marble. Wall paintings were characterized by a high quality and a great chromatic diversity. A series of mosaics, dated to the 3rd century, confirm the importance of the baths. The "Pugilator" mosaic, representing two wrestler and a third person, is made of limestone, jasper and quartz.

After the Christian reconquest by King Ferdinand III the Saint, the region of Herrera was allocated to the Order of St. James to establish a fortified, buffer zone with the Kingdom of Granada. Threatening by Moorish raids from Archidona and Serranía de Ronda, the area remained sparsely populated. Following the conquest of Antequera (1410), and, mostly, of Archidona (1468), the border was moved far away, which allowed permanent settlement of the former buffer zone. The population would stabilize only after the fall of Granada in 1492. A pasture was established for cattle grazing, as well as four to five gardens planted near a brook; the small hut village that developed nearby was the first permanent settlement nucleus in Herrera.
The Herrera estate emerged between 1511 and 1514, as two rows of adjacent houses facing each other; forming a small street. After the establishment of the domain of Estepa, granted to Adán Centurión, the population of Herrera dramatically increased. Herrera was definitively settled between 1610 and 1630 by colonists coming form Estepa, Portugal, León and Galicia. From 1631 onwards, the estate was known as Puebla de Herrera, which indicates a significant urban growth.

The flag of Herrera, adopted on 30 June 1992 by the Municipal Council and validated on 27 March 1992 and 12 November 1993 by the Royal Academy of History, is prescribed by Decree No. 76, adopted on 20 February 1996 by the Government of Andalusia and published on 13 April 1996 in the official gazette of Andalusia, No. 43, p. 3,737 (text). This was confirmed by a Resolution adopted on 30 November 2004 by the Directorate General of the Local Administration and published on 20 December 2004 in the official gazette of Andalusia, No. 246, pp. 28,986-29,002 (text).
The flag is described as follows:

Flag: White panel, in proportions 1:2, charged with the municipal coat of arms approved by Decree 325/97 of 28 September.

The coat of arms of Herrera, adopted on 30 June 1992 by the Municipal Council and validated on 12 November 1993 by the Royal Academy of History, is prescribed by Decree No. 325, adopted on 28 September 1994 by the Government of Andalusia and published on 26 November 1994 in the official gazette of Andalusia, No. 190, p. 13,209 (text). This was confirmed by a Resolution adopted on 30 November 2004 by the Directorate General of the Local Administration and published on 20 December 2004 in the official gazette of Andalusia, No. 246, pp. 28,986-29,002 (text).
The coat of arms is described as follows:

Coat of arms: Per pale, 1a and 1b. Or an olive tree proper, 2. Or a bare-chested blacksmith beating a piece of iron on an anvil all proper. A bordure or inscribed with "POPVLVS NATUS IGNIQVE FERRO". The shield surmounted by a Royal Spanish crown.

The arms were designed by José Gallardo Velázquez. The olive trees represent the main crop in the municipality. The smith (herrero) makes the arms canting and recalls the town's history, iron veins and foundries having been mentioned there for ages. The Latin motto reeds "Village born from iron and fire".
[Símbolos de las Entidades Locales de Andalucía. Sevilla (PDF file)]

The Royal Academy of History rejected an earlier proposal of coat of arms. The Academy validated the corrected version of the arms but rephrazed the description, which was deemed "confuse and equivocal". The Academy had validated the proposed flag (most probably, provided the coat of arms is corrected].
[Boletín de la Real Academia de la Historia 1994, 194, 1: 169]