The Liberals had held 64 seats and the PQ 47, with other parties and independents dividing the rest. One seat had been vacant.
Quebec has held two referendums to split from Canada, in 1980 and 1995, the last narrowly rejecting independence.
Polls show there's little appetite for a new referendum and Marois herself has left much uncertainty about if and when one would be held under a PQ government. A recent poll showed support for independence under 30 percent, but analysts said voters were weary of the Liberals after three terms in office.
PQ supporters gathered in a downtown Montreal music hall cheered and waved Quebec flags after returns came in.
More autonomy for Quebec is high on the agenda for the PQ, which has said it would seek a transfer of powers from the federal government in areas like employment insurance and immigration policy. If those measures are rejected, the party believes it would have a stronger case for independence.
Charest called the election more than a year before he had to, citing unrest in the streets due to this spring's student protests over tuition hikes. The most sustained student protests ever to take place in Canada began in February, resulting in about 2,500 arrests.
Education was hardly a major topic during the campaign. Charest sought to focus voters on the need to maintain a stable government promoting job creation during troubled global economic times, instead of electing separatists who would create uncertainty. He stressed his province has largely been spared the economic hardships seen elsewhere in the West.
Marois, 63, was first elected to Quebec's National Assembly in 1981. She retired in 2006 but returned to become PQ leader a year later after her predecessor lost to Charest in an election that landed the PQ in third place. She in turn lost to Charest in 2008 but the 54-year-old Liberal leader seems to have lost his bet when he called early elections in August seeking a fourth mandate.
Police officers were visible in the streets of Montreal one day after hundreds of protesters banged pots in a show of disapproval of the Liberals.
Earlier in the day, Charest was jeered loudly during a campaign stop.