Local authorities said the gunman had been identified and had a criminal record but did not give a motive.
French prosecutors say a terror investigation has been opened.
In a statement the prefect of France’s Bas-Rhin region confirmed that two people had died, seven were in a serious condition and four others had been injured.
Authorities had urged the public to avoid the area close to the well-known market which is set up around the city’s cathedral and around two miles from the European Parliament building.
The Parliament has been in lockdown today with spokesman Jaume Duch saying that “no-one can leave until further notice.”
French President Emmanuel Macron has adjourned a meeting at the presidential palace to be able to monitor the events.
Some British and Irish MEPs were caught up in the security operation and several others tweeted to say that both they and their staff were safe and accounted for.
Labour MEP for Yorkshire and the Humber, Linda McAvan, tweeted: “There’s a shooting incident tonight in Strasbourg centre where Xmas market takes place. European Parliament on lock down. I and my staff are safe in the building.”
Sinn Fein MEP Martina Anderson said: “We were in the centre of #Strasbourg town when gun shots went off."
Strasbourg Christmas market is one of the oldest in Europe with 300 wooden chalets set up in the city’s historic centre from November 23 to Christmas Eve.
One of the biggest Christmas trees in Europe is put up in Place Kleber, the largest square in the city, which was named after French general Jean-Baptiste Kleber who was born in Strasbourg in 1753.
Police in Germany have said they are strengthening controls at the Franco-German border near the city.
The police force of Baden-Wurttemberg, a state in south-west Germany bordering Strasbourg, tweeted they were taking the extra measures at the border because of the shooting.
Updating its travel advice for France the Foreign Office advised Britons to “avoid the area and follow the advice of local authorities”.