It is not known when the town was established but it certainly owes its existence to its location at the narrowest point across the Little Belt. The town was granted its first privileges at the end of the 13th century at a time when fishing played an important role in addition to its ferry link to Snoghøj in Jutland. From the Middle Ages the town appears to have specialized in catching harbour porpoises. In the 16th century cattle export was also significant.
After the Swedish Wars in the 17th century the town suffered from losing its foreign export privileges and from competition from Fredericia on the other side of the belt, which not only had a ferry link to Strib but levied customs duties on traffic through the Little Belt. In the 18th century income from porpoise catches diminished but in the 19th century, with the establishment of its own harbour in 1836, conditions improved thanks in particular to the growing trade in agricultural products from the surrounding areas. From the mid-19th century small industries started to develop, especially the iron foundry. The rail link between Middelfart and Nyborg opened in 1865, bringing added prosperity despite the fact that it connected with the ferry from Strib rather than the one from Middelfart.
By the beginning of the 20th century the iron foundry, with about a hundred workers, was the town’s main industry. After the first Little Belt Bridge was completed in 1935 Middelfart became an important hub for traffic between Jutland and Funen.
The population grew from 2,345 in 1880 to 11,056 in 1950 but in the second half of the 20th century the rate of growth declined. In 1970 a motorway bridge to Jutland was opened and in 2007 Middelfart became the seat of an expanded municipality, which included the former communes of Ejby and Nørre Aaby.
Middelfart Municipality had a population of 37,685 in January 2014. The municipality is also a part of the East Jutland metropolitan area with 1.2 million inhabitants.
From the Middle Ages until the end of the 19th century the local fishermen were also whale hunters in winter. The only whale common in Danish waters is the Harbour Porpoise Phocoena phocaena. The whale hunters linked their boats across the rather narrow Little Belt and by beating the sea with sticks and branches they directed the migrating porpoises to low water areas where they could be slaughtered. As the whale blubber was used for lamps, indoors and outdoors, the arrival of electricity made whale hunting uneconomical. In the winter of 1854–55, 1742 whales were caught, but a normal winter’s catch would be half that or even less. In the 20th century the hunt was resumed during the two world wars. Two memorial stones now stand where the hunters landed the whales and where blubber was prepared.
Middelfart is served by the passenger rail service between Copenhagen and Jutland. Gammel Havn (Old Harbour) dates from the 1830s. At the beginning of the 20th century it was extended and deepened to the east.