With two weeks to go before crucial legislative elections, French President Francois Mitterrand has caused controversy by abandoning the pretense of presidential impartiality and in effect heading the Socialist Party campaign.

Tonight, in the latest of a series of campaign appearances, Mitterrand, 69, whose own mandate does not expire until 1988, went on a popular television talk show to defend the Socialist record in government since the left wing's election victory of May 1981.

He urged his fellow citizens to support a government that has "worked well, put the country back on its feet, increased individual liberty and created a great cultural reawakening."

Opposition leaders have criticized Mitterrand's unexpectedly prominent role in the campaign, arguing that it will be difficult for him to pose as the symbol of a national consensus after the March 16 election if the right wins. An opposition victory could lead to a trial of political strength between a left-wing president and a right-wing government and National Assembly.

Neo-Gaullist leader Jacques Chirac, a leading contender for prime minister in the event of a right-wing victory, accused Mitterrand of transforming himself from president into a "party activist."

Tonight, Mitterrand dismissed the criticism of his campaign role as "hypocritical." He said all Fifth Republic presidents, from Gen. Charles de Gaulle on, have intervened openly in legislative elections, usually on the eve of the voting.

In a televised address on the eve of the 1978 legislative elections, then-president Valery Giscard d'Estaing urged French citizens to make "the good choice" and support the right. Mitterrand tonight described such last-minute interventions as wrong and said he would make no comment after the official closing of the campaign on March 14.

Mitterrand differs from his predecessors in the extent of his involvement in the campaign and his evident relish for the electoral battle. His appearances around the country have included mammoth rallies in support of the two Socialist prime ministers since 1981, Pierre Mauroy and Laurent Fabius.

Socialist posters carry the simple slogan, "With the president for a majority of progress," against the backdrop of a village church steeple. The church image, with its evocation of the traditional values of rural France, also featured prominently in Mitterrand's successful 1981 campaign for president.

While Mitterrand has taken care to surround himself with politically neutral props, notably the French tricolor and the national slogan, "Liberty, Equality, Fraternity," his rhetoric has been partisan. He has described the right-wing election program as an attempt to divide France into a country of rich and poor and warned of political instability if the opposition wins.

Mitterrand's campaigning has been welcomed by Socialist activists who regard him as their most valuable electoral weapon. The hope is that the Socialist Party will gain votes, particularly from the Communists, by presenting the election as a referendum for or against the president.

Opinion polls show that the Socialists could get up to 30 percent of the vote, holding their position as the largest party. The polls continue to predict an overall majority for the opposition, but the gap between left and right has been cut, in part through Mitterrand's campaigning.

Mitterrand has turned the Socialist Party into the dominant electoral force on the left during the past 15 years, eclipsing the Communists. He himself, however, has remained an enigmatic figure, associated in the minds of many voters with the political intrigues and revolving-door governments of immediate postwar France.

By taking such a prominent campaign role, Mitterrand has overshadowed his Socialist Party proteges, notably Fabius, whose political fortunes have fallen recently, in part because he dared to criticize the president in public for receiving Polish leader Wojciech Jaruzelski.