PARIS—French prosecutors opened a probe Thursday into a suspected attempt to tar French presidential candidate Emmanuel Macron after anonymous files ricocheted across the internet suggesting he had created a shell company on the Caribbean island of Nevis, where officials said they have no record of any such entity.

Just days before Sunday’s presidential vote, PDF files anonymously posted on a far-right internet discussion forum Wednesday showed what it said were corporate records of a company named La Providence LLC purportedly created by Mr. Macron in Nevis, a noted offshore tax haven. La Providence is the name of Mr. Macron’s high school in Amiens, his hometown in northern France.

Mr. Macron on Thursday vigorously denied that he had created any such company and filed a complaint with the Paris prosecutor’s office, which responded by opening a probe into suspected electoral manipulation and distribution of false information.

“We must never let untruths, attacks and destabilization go unchallenged, above all at the end of the campaign,” Mr. Macron said on French television.

A Nevis-based executive one of the files mentioned as a representative of La Providence has had no connection to any company with that name or its purported owner, according to the executive’s employer, international corporate-services firm Dixcart.