They drove to the Curtis Culwell Center in Garland as the event was ending, and began shooting at the 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.
Dutch anti-Islamic politician Geert Wilders had been one of the keynote speakers at the event. He tweeted that shots had been fired and he had safely left the building.
Security had been high around the centre because of the controversial nature of the event.
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 19:00, they were told of a shooting outside.
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 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.
At least five people, including a four-month-old baby, have been killed after dozens of tornadoes…
Harvey Weinstein has been hospitalized just days after his 2020 rape conviction in New York…
Hamas has published a video showing the first proof of life of US and Israeli…
Prosecutors and Donald Trump’s attorneys delivered opening statements and the first witness was called on…
The House of Representatives has finally approved $61 billion in new US military aid for…
The real estate market in the United States has always been a gauge for economic…