The book was described by the prize’s judges as “the perfect novel for now”.
Award organisers said Coe’s 13th novel tells the story of “a changing country and the cracks that appear within families and between generations”.
He is one of five winning authors in different genre categories.
They will each receive £5,000 and go forward to be in contention to be named the overall Costa Book of the Year on 28 January.
Middle England spans 2010 to 2018 and follows a range of characters including a couple who attend marriage counselling after voting different ways in the 2016 referendum.
In the other categories, Sara Collins won best first novel for her gothic romance The Confessions of Frannie Langton, about the twisted love affair between a Jamaican maid and her French mistress in 19th Century London.
First novel award – The Confessions of Frannie Langton by Sara Collins
Novel award – Middle England by Jonathan Coe
Biography award – The Volunteer: The True Story of the Resistance Hero who Infiltrated Auschwitz by Jack Fairweather
Poetry award – Flèche by Mary Jean Chan
Children’s book award – Asha & the Spirit Bird by Jasbinder Bilan
Last year the novel award was won by Irish author Sally Rooney for her second effort Normal People, and the overall book of the year award was won by Bart van Es for his biography The Cut Out Girl.