Gmina Margonin is an urban-rural gmina (administrative district) in Chodzież County, Greater Poland Voivodeship, in west-central Poland. Its seat is the town of Margonin, which lies approximately 13 kilometres (8 mi) east of Chodzież and 64 km (40 mi) north of the regional capital Poznań.
The gmina covers an area of 122 square kilometres (47.1 sq mi), and as of 2006 its total population is 6,414 (out of which the population of Margonin amounts to 2,956, and the population of the rural part of the gmina is 3,458).
Apart from the town of Margonin, Gmina Margonin contains the villages and settlements of Adolfowo, Bugaj, Dębiniec, Karolinka, Klaudia, Klotyldzin, Kowalewo, Lipiniec, Lipiny, Marcinek, Margońska Wieś, Młynary, Próchnowo, Radwanki, Studźce, Sułaszewo, Sypniewo, Tereska, Witkowice, Zbyszewice and Żoń.
Gmina Margonin is bordered by the gminas of Budzyń, Chodzież, Gołańcz, Szamocin and Wągrowiec.