The Dogs overcame a 27-point deficit midway through the second term to defeat the Demons 17.8 (110) to 15.10 (100).
The win momentarily positions the Dogs in the top-eight, after Richmond took away only two points following its drawn match with Fremantle on Friday night.
READ MORE: Aussie Barber claims historic javelin gold
READ MORE: Ponga left shattered after latest head knock
The Demons maintained control for a majority of the match at Marvel Stadium, but the Dogs would not be denied, remaining within touching distance to steal victory at the death.
Jamarra Ugle-Hagan celebrates after scoring the match-winning goal against the Melbourne Demons. (Getty)
Former No.1 draft pick Ugle-Hagan starred for the Bulldogs with two first half goals and a game-changing three majors in the final term. His last of the night, punted from the 50-metre arc with seconds left on the clock, sealed the win.
The 20-year-old also added five score involvements from his 10 disposals.
Melbourne held the lead until the final four minutes when Riley Garcia scored on the run to put the Dogs ahead by three points. The reigning premiers scrambled to conjure another shot on goal but ran out of time.
The Dogs will now turn to their clash with the Cats in Geelong next week, while Melbourne will travel to Perth to take on Fremantle.
For a daily dose of the best of the breaking news and exclusive content from Wide World of Sports, subscribe to our newsletter by clicking here!