Oumar Niasse and Abel Hernandez gave Hull a two-goal cushion after team-mate Lazar Markovic had cancelled out Alvaro Negredo's early opener for Middlesbrough in a breath-taking first 45 minutes.
Boro hit back in first-half stoppage-time through Marten De Roon's controversial header before Harry Maguire headed Hull's fourth midway through the second period.
Victory was the Tigers' fifth in six home league games and lifted them two points above Swansea, while Boro, without a league win since December 17, appear destined for a return to the Sky Bet Championship.
The Teessiders played their full part in a pulsating encounter, but are now seven points adrift of safety with eight games remaining.
Hull thought they had drawn first blood, but Niasse was deemed offside when he turned the ball home at the end of a slick move in the third minute and the first blow was landed by Boro two minutes later.
Adama Traore's low angled cross from the right side of the penalty area was turned home at the far by the unmarked Negredo. It was the Spaniard's first goal since the end of January and only the visitors' second in seven league matches.
The Tigers responded well with Kamil Grosicki volleying inches over the crossbar before they equalised in the 14th minute through Markovic, who slammed the ball home from close range after the visitors had failed to clear Niasse's flick-on from Andrew Robertson's cross.
A rip-roaring start to the game suggested more goals were in the offing and Hull turned the game on its head in the 27th minute.
Alfred N'Diaye hooked the ball forward and Hernandez's headed pass fell invitingly to Niasse, who buried his shot under Boro goalkeeper Victor Valdes from 12 yards.
Traore and Negredo combined again as Boro swarmed back on to the offensive and the latter's shot on the turn was kept out by Hull keeper Eldin Jakupovic before the home side swept into a 3-1 lead.
Maguire's diagonal ball was crossed first time by Grosicki from the right and with Valdes stranded, Hernandez steered home his fourth league goal of the season.
But Boro refused to surrender. With nothing to lose the Teessiders pushed men forward and they were soon creating further chances.
Rudy Gestede's header from Stewart Downing's cross forced Jakupovic into a brilliant reflex save and Negredo curled a left-footed effort a whisker wide.
Boro reduced the deficit in first-half stoppage time in controversial circumstances. Adam Clayton's corner was nodded on by Ben Gibson and with both De Roon and Traore clearly offside, the former headed home.
Referee Michael Oliver consulted with his assistant and to the disbelief of Hull's players and fans he allowed the goal to stand.
The second half began in the same frenetic style. Hull midfielder N'Diaye's angled drive was saved at full stretch by Valdes, but such were their exertions in the first periods, players on both sides were already looking tired.
Hull gave themselves some much-needed breathing space and restored their two-goal cushion in the 70th minute when Maguire stole in unmarked at the far post to head home Robertson's curling cross.
Maguire's emphatic finish, from a tight angle, appeared to take the wind from Boro's sails.
Niasse blazed an angled shot over the crossbar and although the visitors battled gamely until the end, their best efforts foundered on the edge of Hull's area as the home side held on for three more vital points.