United had already seen off Greenock Morton and Falkirk in the playoffs and entered today's clash at New Douglas Park with high hopes of an immediate bounce back to the top flight after the two sides played out a goalless draw in the first leg.
Indeed, United started the contest the more composed of the two sides and could have been ahead after just five minutes when Tony Andreu had a shot from close range following Blair Spittal's corner, but Remi Matthews between the Accies sticks got down low for the save.
The hosts were next to have a chance to break the deadlock as Rakish Bingham picked out Ali Crawford, but Cameron Bell was on hand to clear the danger. Simon Murray was straight back down the other end of the pitch with a chance but under pressure and with no support, pulled his shot wide.
As the half wore on, Hamilton grew into the contest and had the better of the chances, with Bell being relied upon to produce some excellent saves to keep the scores level.
First Crawford planted a fierce strike down the middle - palmed out by Bell, cleared by Paul Dixon - then having a powerful attempt in a crowded box, only to be denied again by the keeper.
The Accies were almost behind in embarrassing circumstances as the break approached, Charlie Telfer making a good break down the right before making a cross. Scott McMann's attempt at a clearance almost found its way into the net but Matthews's fingertips were in the right place to spare the young defender's blushes.
Neither side really had the upper hand as the second half wore on and with the hour mark approaching, Accies boss Martin Canning brought on Louis Longridge for David Templeton in an attempt to liven up proceedings.
The hosts were almost immediately ahead as a nervy period saw Murray block Rakish Bingham's shot before Daniel Redmond swung in for Dougie Imrie at the far post, but Bell was on hand with an excellent save.
Just minutes later Bell was left with no chance, however, as Docherty put the hosts ahead. Crawford's neat layoff met the young midfielder 25 yards out and he made no mistake with a low shot to the right of Bell.
Within minutes of scoring just the fifth goal of his Accies career, Docherty found himself watching from the sidelines as an apparent hamstring problem forced him off and Darren Lyon was brought on in his stead.
It was almost game over with just seven minutes to go, Bingham racing through on goal only to be thwarted by a smothering save from an onrushing Bell to keep his side in the contest.
Murray almost gave his side the lifeline they needed as the clock raced down, finding himself clear down on the left but instead opted to shoot with his right foot and sent the ball over the crossbar.
Tempers frayed with just seconds to go as unsavoury scenes saw Fraser and Dixon become involved in a shoving match with Longridge, the referee issuing yellow cards before drawing the curtains on the contest.
With the victory, Hamilton have now secured their place in the top flight of Scottish football for an unprecedented fourth consecutive season.