Early results, based on a count of 65.7% of votes, put the UMP at 45.5% with the opposition socialists at 47%.
The vote is seen as a test of Mr Sarkozy's first year in office. His popularity has fallen in recent months.
However, the socialists' lead is smaller than some predicted, and the outcome in some large cities in particular remains finely balanced.
Socialist leader Francois Hollande said voters had sent a warning to Mr Sarkozy and the government over its policies.
The Socialists are expected to hold on to power in Paris and Lyon and exit polls suggested they could also take Marseille, Strasbourg and Toulouse from Mr Sarkozy's party.
But although UMP head Patrick Devedjian admitted earlier that the results were "not good", another conservative said there had been no "pink wave" - meaning no surge of left-wing support across the country.
The second round run-off is scheduled for 16 March.