The story
From rotten (“in a state of decay”) + borough (“type of administrative district”), because such boroughs were regarded as having “decayed” due to their voters moving away to other places.
First known use, by meaning
- from mid 18th c. A parliamentary borough that was represented in Parliament although the number of voters had diminished so greatly that they were largely controlled by the main landowner; such boroughs were abolished in the 19th century.
Etymology from Wiktionary, CC BY-SA 4.0.