Macken stabbed home the ball seconds from the end of five minutes of overtime to give the home side two wins in a row.
Iain Hume gave the home side an early lead, but Town levelled just before the break and Hume missed a penalty midway through the second half.
Ipswich boss Roy Keane was given resounding backing by the Portman Road board before the game and was given a welcoming ovation before the game by travelling fans.
But it was fellow strugglers Barnsley who started better after their impressive midweek win over high-flyers West Brom.
It was the home side who swept in front after eight minutes when Canada international Hume hit his second goal in two matches.
The striker won a header that dropped for Macken, took the return and curled an accurate low left-footer out of reach of Richard Wright diving full stretch.
Ryan Shotton hit a low shot that Wright held as Barnsley seized the initiative and Stephen Foster's bullet header from a Hume corner was tipped over.
The visitors almost cashed in on a mistake by Foster but he recovered to block an Alan Quinn shot.
Macken smashed another shot over for the home side but seconds before the break the visitors levelled.
A tremendous free-kick from Grant Leadbitter was beaten away by on-loan keeper Baartosz Bialkowski and Liam Rosenior dived to head in the rebound.
After the restart a Leadbitter corner dropped for Alan Quinn but his effort was blocked and Ipswich began to take control looking for a winner.
On the break Barnsley were still dangerous and Quinn had to head off the line when a wind-sassisted Hume corner almost curled in.
Town saw a shot from Jonathan Walters held by the keeper and Liam Trotter was in a great position but smashed his shot off target.
After 72 minutes Barnsley had a penalty when Tommy Smith was adjudged to have dragged down Hume in the area but Hume hit the post from the spot.
In the dying seconds Adam Hammill's free-kick caused problems and Macken pounced four the winner.