Hibs' 15-year stay in the Scottish Premiership was in danger after Jason Scotland's goal reduced their 2-0 first-leg lead in the play-off final.
Anthony Andreu squared the tie 10 seconds from the end of stoppage time.
Neither side managed to score in extra time, but Hibs' Kevin Thomson and Jason Cummings both had penalties saved.
It was goals from teenager Cummings that had given Terry Butcher's side a 2-0 advantage over the Championship runners-up after the first leg at New Douglas Park.
But it was Accies goalkeeper Kevin Cuthbert who was the hero of the return leg, parrying away two nervously struck spot kicks to spark scenes of joy among the Accies faithful and protests outside Easter Road from their angry home counterparts.
The spirits of the majority of the 18,000 near-capacity crowd had already not only been dampened by a dreich Edinburgh downpour but the kind of abject display all to familiar from the men in green and white this season.
And four perfect penalties from Hamilton will send shockwaves through Easter Road after a season that started with a 9-0 aggregate defeat by Malmo under one manager and ended with a run of one win in 15 games and relegation under another.
They are now facing the prospect of chasing one automatic promotion spot in a Championship that will not only contain relegated neighbours Hearts but League One champions Rangers, two clubs recovering from their respective financial meltdowns.
Few had given Accies, who had already come through a two-leg semi-final against Falkirk, much chance of rescuing their promotion hopes as they arrived in Edinburgh looking for a first win in four away games.
However, the statistics also gave them hope - having only lost two of their last 16 games, while Hibs had not won any of their last six at home and their midweek win being their first in 14 outings.
Butcher had given on-loan Notts County forward Danny Haynes another chance to show why he was capped for England at youth level by starting the 26-year-old ahead of off-form teenager Alex Harris.
After a crunching Jon Routledge tackle had the former Ipswich man limping for the touchline after seven minutes, Hibs were back to their midweek line-up.
Six minutes on and Haynes' pain spread to the home stands after a misplaced Ryan McGivern pass led to the ball being swiftly dispatched into the back of the Hibs net.
An interception by Accies midfielder Ali Crawford, who had started ahead of James Keatings, was flicked on by Routledge and Scotland's quick turn mugged Michael Nelson before the striker's left-foot drive from just inside the penalty box slipped under the outstretched hand of goalkeeper Ben Williams.
The veteran former Trinidad and Tobago international had not been considered match fit at New Douglas Park, but his introduction in place of Mikael Antoine-Curier had provided the missing goalscoring link.
As with the first leg, it was Accies who were playing the prettier possession football while Hibs were relying on hopeful balls to expose flaws in a second-tier defence.
The ploy, either by accident or design, almost worked for the home side as Paul Heffernan's joy at finding the net was cut short by an offside flag then the striker broke clear before firing across goal.
If Williams had been at fault for the goal, he made up with it as his outstretched foot prevented Louis Longridge's low drive tying the aggregate score.
Cummings had a close-range header cleared off the Accies goal-line, but Hibs were fortunate not to find themselves further behind on the day by half-time as Andreu fired into the side-netting.
Butcher threw Cummings up front in support of Heffernan after the break in search of a tension-releasing equaliser, but the reduction in midfield manpower was leaving their creaking defence exposed.
When Scotland cleverly chested down a cross at the back post and another twist left two Hibs men flying in the opposite direction, Williams had to be quick off his line to block the striker's shot.
Accies, with manager Alex Neil having brought himself into midfield from the bench, continued to play the tidier football but the chances dried up and Hibs went into four minutes of injury time with an aggregate lead.
But there was to be a dramatic equaliser with Scotland shrugging off Michael Nelson to cross low for the stretching Andreu to fire home from 10 yards.
And the visitors' joy turned to ecstasy 30 minutes later as Scotland's capital city was left without a representative in the nation's top flight.
Match ends, Hibernian 0(3), Hamilton Academical 2(4).
Penalty Shootout ends, Hibernian 0(3), Hamilton Academical 2(4).
Penalty saved! Jason Cummings (Hibernian) fails to capitalise on this great opportunity,  left footed shot saved  in the bottom right corner.
Goal!  Hibernian 0(3), Hamilton Academical 2(4). Jason Scotland (Hamilton Academical) converts the penalty with a right footed shot to the bottom left corner.
Goal!  Hibernian 0(3), Hamilton Academical 2(3). Owain Tudur-Jones (Hibernian) converts the penalty with a right footed shot to the bottom right corner.
Goal!  Hibernian 0(2), Hamilton Academical 2(3). Mickael Antoine-Curier (Hamilton Academical) converts the penalty with a right footed shot to the bottom right corner.
Goal!  Hibernian 0(2), Hamilton Academical 2(2). Liam Craig (Hibernian) converts the penalty with a left footed shot to the centre of the goal.
Goal!  Hibernian 0(1), Hamilton Academical 2(2). Tony Andreu (Hamilton Academical) converts the penalty with a right footed shot to the bottom left corner.
Goal!  Hibernian 0(1), Hamilton Academical 2(1). Ryan McGivern (Hibernian) converts the penalty with a left footed shot to the bottom left corner.
Goal!  Hibernian 0, Hamilton Academical 2(1). Grant Gillespie (Hamilton Academical) converts the penalty with a right footed shot to the bottom left corner.
Penalty saved! Kevin Thomson (Hibernian) fails to capitalise on this great opportunity,  left footed shot saved  in the bottom left corner.
Penalty Shootout begins Hibernian 0, Hamilton Academical 2.
Second Half Extra Time ends, Hibernian 0, Hamilton Academical 2.
Andy Ryan (Hamilton Academical) wins a free kick in the attacking half.
Foul by Owain Tudur-Jones (Hibernian).
Attempt missed. Liam Craig (Hibernian) right footed shot from outside the box is high and wide to the right.
Foul by Grant Gillespie (Hamilton Academical).
Kevin Thomson (Hibernian) wins a free kick on the right wing.
Foul by Darian MacKinnon (Hamilton Academical).
Scott Robertson (Hibernian) wins a free kick on the left wing.
Foul by Ziggy Gordon (Hamilton Academical).
Scott Robertson (Hibernian) wins a free kick on the left wing.
Foul by Alex Neil (Hamilton Academical).
Samuel Stanton (Hibernian) wins a free kick in the attacking half.
Attempt blocked. Ryan McGivern (Hibernian) right footed shot from the centre of the box is blocked.
Corner,  Hibernian. Conceded by Grant Gillespie.
Second Half Extra Time begins Hibernian 0, Hamilton Academical 2.
First Half Extra Time ends, Hibernian 0, Hamilton Academical 2.
Andy Ryan (Hamilton Academical) wins a free kick in the defensive half.
Foul by Ryan McGivern (Hibernian).
Attempt saved. Mickael Antoine-Curier (Hamilton Academical) right footed shot from the right side of the box is saved in the centre of the goal.
Andy Ryan (Hamilton Academical) is shown the yellow card.
Darian MacKinnon (Hamilton Academical) wins a free kick on the right wing.
Foul by Scott Robertson (Hibernian).
Foul by Martin Canning (Hamilton Academical).
Jason Cummings (Hibernian) wins a free kick on the right wing.
Andy Ryan (Hamilton Academical) wins a free kick in the attacking half.
Foul by Ryan McGivern (Hibernian).
Mickael Antoine-Curier (Hamilton Academical) wins a free kick in the defensive half.
Foul by Michael Nelson (Hibernian).
Hamilton Academical ended their three-year absence from Scotland's top flight after a dramatic penalty shootout that consigned Hibernian to relegation.