The 34-year-old dominated opponent Aleksandr Nedovyesov for a 7-6 (7-2) 6-2 6-3 victory in the decisive singles rubber in Darwin.
Earlier Sam Groth levelled the tie against Mikhail Kukushkin.
Australia travel to Great Britain, who defeated France, for the last-four tie in September.
Neither Hewitt nor Groth had initially been selected to play singles but captain Wally Masur dropped youngsters Thanasi Kokkinakis and Nick Kyrgios after Kazakhstan had opened up a 2-0 lead.
They teamed up to reduce the deficit in the doubles before victories in their respective singles matches saw them come back to win from 2-0 down for the first time since 1939.
Hewitt, Wimbledon winner in 2002, embraced his team-mates after the victory, saying: "This is up there.  I love the back-against-the-wall situations. That's what we had after day one.
"We had to rally together and find a way to get the win.  I've always said some of my greatest wins are in Davis Cup and some of my toughest losses are in Davis Cup so I'm going to enjoy this one. This is what dreams are made of."
Former Wimbledon champion Lleyton Hewitt guided Australia into the Davis Cup semi-finals as the hosts came from 2-0 down to beat Kazakhstan 3-2.