Connacht dealt a major blow to Ulster's hopes of making the Pro12 play-offs by winning Saturday's clash in Galway.
Miah Nikora's penalty and try helped Connacht lead 8-0 before Paddy Jackson replied with two Ulster penalties.
Gavin Duffy's try extended Connacht's lead to 13-6 but a Paul Marshall try and five Jackson points left the visitors three ahead at half-time.
Tiernan O'Halloran and Jackson scored tries at either end but two Nikora penalties helped Connacht take the win.
Ulster coach Brian McLaughlin retained only Tom Court, Ian Humphreys and Stefan Terblanche from the stirring Heineken Cup quarter-final win over Munster.
Connacht's early pressure yielded a penalty for Nikora with Ian Humphreys missed an immediate chance to level.
But Connacht, boosted by their first-half wind advantage, continued to dominate possession and fly-half Nikora charged over for a deserved eighth-minute try after evading Robbie Diack and Adam D'Arcy.
However, Connacht's momentum was then halted by Ronan Loughney's sin-binning for a late tackle on Ian Humphreys.
Jackson took on the kicking duties to punish the indiscretion and his second successful penalty on 23 minutes cut Connacht's lead to 8-6.
However, Connacht profited from more weak Ulster tackling to score their second try as Duffy jinked inside Terblanche after taking a Henry Fa'afili pass.
After Nikora missed the tricky conversion, Ulster fought back to level within five minutes as Marshall's try was followed by another successful Jackson kick.
Marshall was forced off by injury immediately after his score to be replaced by Ruan Pienaar but Ulster still had time to move ahead before the break as Jackson kicked his third penalty.
However, Connacht were back in the lead within three minutes of the restart as O'Halloran held off Pienaar to score in the corner after a superb reverse pass by John Muldoon.
Nikora added the extras to increase Connacht's lead to 20-16 but Ulster were ahead again by the 53rd minute as Jackson rumbled his way over the line.
However, a Nikora penalty restored Connacht's lead in the 61st minute and the fly-half repeated the dose on 73 minutes after Ulster replacement Ali Birch had been sin-binned as the home side held on for a deserved first win over their Irish rivals since 2005.
Connacht: G Duffy (capt), T O'Halloran, K Tonetti, H Fa'afili, F Vainikolo, M Nikora, F Murphy; B Wilkinson, E Reynecke, R Loughney, M Swift, M McCarthy, J Muldoon, R Ofisa, G Naoupu.
Replacements: E Griffin for Fa'afili 55, P O'Donohoe for Murphy 70, D Buckley for Wilkinson 11, J O'Connor for Ofisa 13.
Not Used: A Flavin, R Ah You, M Kearney, M Jarvis.
Ulster: S Terblanche, I Whitten, N Spence, P Jackson, A D'Arcy, I Humphreys, P Marshall; P McAllister, N Brady (capt), T Court, L Stevenson, N McComb, M McComish, W Faloon, R Diack
Replacements: C Gilroy for Humphreys 56, R Pienaar for Marshall 37, C Black for McAllister 68, A Kyriacou for Brady 68, A Macklin for Court 56, I Henderson for McComb 74, A Birch for Diack 55
Not Used: M Allen.
Referee: D Edwards (RFU)