Fremantle held off a courageous late charge from Sydney to book a spot in the preliminary final after a nine-point win at Domain Stadium.
The Swans came home the better side and were throwing everything at the home side in the final stages, but inaccuracy cost them dearly as the Dockers posted a 10.9 (69) to 7.18 (60) win.
West Coast’s qualifying final win over Hawthorn on Friday night means the two preliminary finals will be in Perth.
Fremantle will host their preliminary final on the Friday night and West Coast will play on Saturday.
The Swans will host a sudden-death semi-final next Saturday after almost pulling off an outstanding comeback win against the Dockers.
Missing All-Australians Lance Franklin, Kieren Jack and Nick Smith, plus midfielder Luke Parker, the Swans also lost Sam Reid during the match with a hamstring injury.
But they bravely roared back in the second half and will rue their inaccuracy, kicking 1.6 in the first quarter and 2.5 in the last.
In his return from a leg injury, Brownlow Medal favourite Nat Fyfe had 32 disposals for the Dockers, although he limped off briefly in the last quarter.
Swans midfielder Josh Kennedy was best afield with 39 disposals.
It was his 11th 30-plus possession game, understood to be an AFL record.
There was some booing of Sydney veteran Adam Goodes, who played at Domain Stadium for the first time since the infamous July 26 game against West Coast.
Given the strong wind blowing to the city end, the coin toss was crucial.
There was some confusion about the initial call and when it was done again, Sydney captain Jarrad McVeigh gave his side first use of the breeze.
But the Swans blew their chances in a bruising first term, kicking six behinds – most of them from very gettable set shots.
Meanwhile, the Dockers used their local knowledge perfectly and kicked four goals.
Fyfe was like a tank early and had 12 first-term disposals.
Michael Walters’ three goals in the first half proved the difference between the two teams.
Reid finally kicked Sydney’s first goal late in the term and they trailled by 13 points at quarter time.
Disaster struck for the Swans early in the second term when Reid hobbled off with a hamstring injury.
“That’s September (over) for Sydney,” former Adelaide captain Mark Ricciuto said on Triple M.
But Fremantle left the door open and Sydney only trailled by 17 points at the main break.
Sydney had three more scoring shots in the first half, but only kicked two goals.
That meant in three Domain Stadium matches this season, the Swans had kicked a combined four goals in the first halves.
But Sydney were mighty in a pulsating third term.
Kennedy had 16 disposals in the quarter and Dan Hannebery 14 as the Swans continually pressed.
After Fremantle led by 24 points early in the second half, Sydney reduced it to 13 at the last change.
Dockers coach Ross Lyon ripped into his players at three-quarter time and they responded immediately.
Fremantle kicked the first two goals of the final term for a game-high lead of 25 points.
The Swans kept coming, but Rhyce Shaw missed a running shot on goal and Kurt Tippett dropped a simple mark deep in attack.
Tippett kicked two final-term goals, before the Swans closed out the game with three behinds.