The Irish side had to win to keep alive their slim hopes of breaking into the top three in Conference B of the Guinness PRO14, and a thrilling first-half display proved enough to see off Edinburgh.
Winger Jacob Stockdale played a key part as they ran in three stunning tries before the break, while Duncan Weir finished the game with 13 points to his name as he dragged the hosts back into the game.
Despite a penalty try, Edinburgh were unable to come back after conceding a 13-point lead and must wait to confirm their place in next season’s European Champions Cup.
Edinburgh 20, Ulster 32
Tries: Weir, McInally. Cons: Weir. Pens: Weir 2. Edinburgh: Kinghorn, Fife, Bennett, Burleigh, Van Der Merwe, Weir, Hidalgo-Clyne, Lay, McInally, Berghan, B. Toolis, Gilchrist, Bradbury, Ritchie, Mata.
Dean for Burleigh (51), Kennedy for Hidalgo-Clyne (61), Sutherland for Lay (56), Cochrane for McInally (61), Nel for Berghan (56), Carmichael for B. Toolis (56), Du Preez for Mata (56).
Tries: Cave, Piutau, Cooney, Henderson. Cons: Cooney 3. Pens: Cooney 2. Ulster: Piutau, Ludik, Cave, McCloskey, Stockdale, McPhillips, Cooney, Warwick, Best, O’Toole, Dalton, Henderson, Rea, Timoney, Deysel.
Bowe for Ludik (39), Herring for Best (75), Ah You for O’Toole (61), O’Connor for Dalton (47), Reidy for Timoney (72).
Nigel Owens (Wales).