The letter was sent to Jean-Michel Gentil, the most prominent of three judges investigating the case, the magistrate's union SM revealed in a statement published on its website.
The threatening letter, delivered on Wednesday, was accompanied by blank cartridges.
One of Gentil's colleagues said the letter, mailed to his Bordeaux office, also contained threats against other magistrates. Police had been called in to investigate, the colleague added.
The SM, in its online statement, denounced what it called "insulting statements" made by Sarkozy's inner circle which it said were designed to undermine the work of the judiciary.
It noted too that Sarkozy's own lawyer, Thierry Herzog, had questioned Gentil's impartiality in an interview with Sunday newspaper Journal du Dimanche.
The SM said a number of its members were targeted in the letter. Gentil himself is not a member of the union, one colleague told AFP.
Sarkozy's lawyers are attempting to overturn last week's decision by three examining magistrates to charge him in a case that threatens to destroy his hopes of a political comeback.
Gentil last June put his name to an opinion column signed by dozens of legal professionals in Le Monde newspaper, accusing Sarkozy and his predecessor Jacques Chirac of "wishing to protect the corrupt", Herzog pointed out.
Herzog added that five days after signing the column, Gentil had ordered police to search Sarkozy's home, office and his secretary's house.
Henri Guaino, a former special adviser to Sarkozy and a deputy with his right-wing UMP party said the magistrate's decision to place the former president under formal investigation had "dishonoured justice".
On Wednesday, Socialist Justice Minister Christiane Taubira intervened in the growing row. She asked the magistrates' governing body, the Conseil superieur de la magistrature (CSM), to give its view on what effect the attacks on Gentil were having on the "proper functioning of the judiciary".
Sarkozy himself has repeatedly denied claims he accepted cash-stuffed envelopes from the world's richest woman Liliane Bettencourt to fund his successful 2007 campaign.
Medical experts say the mental faculties of the L'Oreal heiress began to deteriorate in 2006.
On Monday, Sarkozy used his Facebook page to insist he had not taken advantage of Bettencourt. Describing the charges against him as "unfair and unfounded", he vowed to clear his name.
With the right divided by in-fighting, Sarkozy had, in recent weeks, hinted that he was considering a return to the frontline of French politics.
He suggested in one interview that he could be forced to re-enter the fray out of a sense of duty to his country.
Last week's decision by the judges to put him under formal investigation dealt a blow to those ambitions.
Sarkozy could face up to three years in jail, a fine of €375,000 and a five-year ban from public office if convicted.