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.
The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…