They drove to the Curtis Culwell Center in Garland as the event was ending, and began shooting at a security officer before being killed by police.
The bomb squad has been called in to search their vehicle for explosives.
The event, organised by a group critical of Islam, included a contest for drawings of the Prophet.
Security had been high around the centre because of the controversial nature of the event, which included Dutch anti-Islamic politician Geert Wilders as one of the keynote speakers.
But Garland Police Department spokesman Joe Harn said there had been no credible threats in advance, and it was not immediately clear if the shootings were related to the event.
About 200 people had been attending the Muhammad Art Exhibit when, shortly before it was due to finish at 1900 (0000 GMT), they were told of a shooting outside.
One woman at the conference was leaving the building when she said she heard “quick shots” from what she thought was a machine gun.
“Police started running everywhere, they quickly told us to run as fast as we could to get back in the building,” she said.
They and people from nearby buildings were later evacuated.
Garland Mayor Douglas Athas told CNN that the “first suspect was shot immediately”. “The second suspect was wounded and reached for his backpack. He was shot again.”
Security officer Bruce Joiner was taken to hospital after being shot in the ankle, but was later released.
Local police said they have not been yet able to identify the gunmen, whose bodies remain by the car while the bomb squad inspects it for explosives.
Joe Harn, a spokesman for the Garland Police Department, warned that the inspection is “a very slow, tedious operation that goes on”.
Sunday’s event was organised by the American Freedom Defense Initiative (AFDI), which is run by controversial blogger and activist Pamela Geller and is listed as an anti-Muslim group by the Southern Poverty Law Center, a civil rights group.
The conference included a contest that offered a $10,000 (£6,600) prize for a cartoon of the Prophet Muhammad.
Depictions of the Prophet Muhammad are offensive to many Muslims.
There were widespread protests in 2006 when the Danish newspaper Jyllands-Posten published cartoons satirising the Prophet Muhammad.
In January this year, 12 people were murdered by two Islamist gunmen at the French magazine Charlie Hebdo, which had published similar cartoons.
And a gathering of free speech activists in the Danish capital Copenhagen was targeted by a gunman in February, killing a film director.
In a text message to Dutch media, Geert Wilders said Sunday’s incident had been an “unacceptable” attack on freedom of expression.
“The only fitting response is: to carry on. But it’s not easy,” he told Dutch public broadcaster NOS.
In a statement on its Facebook page, the AFDI called it a “war on free speech”.
The Curtis Culwell Center – a school-district owned building for public events – was at the centre of controversy in January, after it was picketed by protesters angry that it was hosting an event to raise funds for the building of a local Islamic centre.