Nanterre prosecutor Philippe Courroye said in a statement he had been charged by a Paris judge with "illegally collecting data of a personal nature by fraudulent means" and "violating the confidentiality of sources".
Courroye said he "vigorously denies" the accusations and had appealed the charges.
Under French law, preliminary charges are brought to allow magistrates to continue investigations before possibly sending a case to trial.
The case centres on an alleged police investigation, ordered at the highest level, to identify a leak feeding information to a journalist with French newspaper Le Monde.
Police allegedly obtained the journalist's mobile telephone logs in 2010 in order to identify the source in a complex illegal political financing scandal linked to L'Oréal heiress and billionaire Liliane Bettencourt.
The scandal began as a dispute between the heiress and her daughter but soon evolved into allegations that Bettencourt had been handing bundles of cash to politicians, including Sarkozy's 2007 presidential campaign manager.
Courroye, who French media have reported is a friend of Sarkozy, is the latest in a series of the president's allies charged in the scandal.
The head of France's DCRI domestic intelligence agency, Bernard Squarcini, was charged in the case in October.