The first written documentation about Ahrem was in 1256, when the archbishop of Cologne mentions Ainhem. However the name of the village points to roots in the time of the Franks; it means "village of Arn (or Arno)". This dating is supported by a cemetery which was dated to the 6th century.
Ahrem belonged to the clerical state of Cologne, in the Amt Lechenich. Originally it was a few separated farm buildings, but during the centuries grew a core settlement around the main street and the small brook Lechenicher Mühlengraben. The village remained small - in 1801 it had just 215 citizens.
During the communal reform of 1969 the village was incorporated into the new city of Erftstadt.