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.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…