1540s, from Middle French municipal, from Latin municipalis "pertaining to a citizen of a free town, of a free town," also "of a petty town, provincial," from municipium "community, municipality, free town, city whose citizens have the privileges of Roman citizens but are governed by their own laws," from municeps "native, citizen, inhabitant of a free town."
The second element is -cipere, combining form of capere "assume, take," from PIE root *kap- "to grasp." The first element is from munus (plural munia) "service performed for the community, duty, work," also "public spectacle paid for by the magistrate, (gladiatorial) entertainment, gift," from Old Latin moenus "service, duty, burden," from Proto-Italic *moini-, *moinos- "duty, obligation, task," from PIE root *mei- (1) "to change, go, move," with derivatives referring to the exchange of goods and functions or obligations within a society as regulated by custom or law.
As cognates in related senses, de Vaan lists Sanskrit meni- "revenge," Avestan maeini- "punishment, castigation," Old Persian yau-maini- "power of revenge," Middle Welsh tramwy, tremynu "to cross, pass," Old Irish moin "value, treasure," Welsh mwyn "value," Lithuanian mainas "exchange," Old Church Slavonic mena "exchange, substitution," Gothic gamains, Old High German gimeins "common." "A municeps is one who 'takes an obligation,' communis 'who partakes in the duties'" [de Vaan]