Star Ghana striker Asamoah Gyan was made to rue his seventh-minute penalty miss, and a host of other chances, as the unfancied Zambians reached the final for the first time in 18 years.
Substitute Mayuka curled home his winner from the edge of the area with 12 minutes remaining in Bata and Ghana's hopes of a comeback were all but ended with the dismissal of Derek Boateng soon after.
Zambia will meet the winner of this evening's other semi-final between Mali and Ivory Coast in Sunday's final in Libreville.
That match is set to provide an emotional stage for the Zambians as they return to the city associated with one of the country's most most tragic events.
Libreville was the city that a plane carrying the Zambian national side refuelled in before crashing into the Atlantic Ocean in 1993, killing all 30 people on board.
The Copper Bullets looked certain to go behind early in today's match when Davis Nkausu tripped Kwadwo Asamoah in the area to concede an early penalty.
Gyan wasted the opportunity, though, as his spot-kick was tame enough to allow Kennedy Mweene to save to his left.
Gyan then forced another save from the Zambia goalkeeper moments later before another mis-hit effort was more comfortably dealt with.
Andre Ayew's free-kick met with an air-shot from his brother Jordan before Zambia missed a glorious chance on the half-hour, when Christopher Katongo was brilliantly played in behind the defence by Rainford Kalaba but scuffed his shot wide.
It mattered not, though, as Mayuka proved his side's match-winner with time ticking down in the game when he turned and perfectly placed his shot beyond a diving Adam Larsen.
Ghana then had Boateng sent off for a second caution with six minutes to go as they crashed out at the semi-final stage for the third consecutive tournament.
One of the top soccer cleats for control the Nike CTR360 will not let you down on the field in tight spaces.
The new PUMA evoSPEED 1.2 FG. A great new soccer cleat with classic look and first time for PUMA to be on the cleat.
Ajax has released their away soccer jersey for the 2013/14 season. Get in the Gear.
Bayern Munich are kings of Germany and hope to be crowned kings of Europe at Wembley later this month!
The adidas Nitrocharge is the most talked about new cleat in years. It was released on May 15 and will take your pitch by storm.
The Juventus jersey for the 2013/14 was released earlier this week. Be the first to wear the colors of the Old Lady.
Borussia Dortmund hears Wembley Calling and are headed to London for the Champions League final.
Chelsea won the Europa League on Wednesday. The Blues defeated Benfica 2-1 on injury time goal from Ivanovic.
The Liverpool 2013/14 soccer jersey is available for pre-order. The Reds are eager to compete for silver next season.
adidas has added some color to the Predator line with this new colorway. Released on May 17. Be the first to own a pair.