Former England batsman Carberry hit 50 off 36 balls as Perth made 144-7 despite a maiden in the final over.
Pietersen, who fired a stunning six with a switch hit, and Luke Wright both made 31 but the visiting side were all out for 126 in the final over.
Perth will play Brett Lee's Sydney Sixers in Wednesday's final.
That match in Canberra will be the Australia paceman's final competitive game before his retirement.
There were boos ringing out from a vociferous home contingent when their tailender Andrew Tye swung and missed at six nearly identical slower deliveries from Clint McKay at the end of the Perth innings.
Pietersen looked to be guiding his team to victory but with 57 needed from 32 balls became the fifth wicket to fall when he advanced down the pitch to paceman Nathan Coulter-Nile and edged to the wicketkeeper.
Tye atoned for his batting with superb slower balls of his own to return 4-15 from his four overs and take Perth through to their fourth successive final as the Stars, who had won five matches in a row in this campaign, lost their fourth BBL semi-final.
On Saturday, Australia T20 left-hander Nic Maddison inspired the Sydney Sixers to a comprehensive 87-run win over the Adelaide Strikers in the first semi-final, with seven fours and five sixes in his 85 from 48 balls.
Sydney made 181-4 after choosing to bat and then dismissed Adelaide for 94 inside 15 overs, with burly left-arm seamer Doug Bollinger taking 3-21 and Sean Abbott claiming 2-14.
The Sixers also have former England opener Michael Lumb, and Carberry's former Hampshire team-mate, in their side.
Michael Carberry helped Perth Scorchers beat Kevin Pietersen's Melbourne Stars by 18 runs at the Waca and reach the Australian Big Bash League final.