A security guard was also injured. Police put the Curtis Culwell Center in Garland on lockdown and evacuated participants.
Dutch anti-Islamic politician Geert Wilders was attending the conference.
Mr Wilders tweeted that shots had been fired and he had now safely left the building.
It was not clear if the shootings were related to the event.
One eyewitness told the Associated Press news agency that he heard about 20 shots, which appeared to come from a car driving past the conference centre, followed by two individual shots.
The City of Garland government, in a statement on its Facebook page, said the security guard’s injuries were not life-threatening.
“As today’s Muhammad Art Exhibit event at the Curtis Culwell Center was coming to an end, two males drove up to the front of the building in a car,” it said.
“Both males were armed and began shooting at a Garland ISD (Independent School District) security officer. Garland Police officers engaged the gunmen, who were both shot and killed.”
It added that the gunmen’s vehicle could contain an “incendiary device” and a bomb squad was at the scene.
It said nearby businesses had been evacuated.
About 75 people inside the building were at first escorted to another room, US media reported. Later, a group of 48 were taken to a school bus and officials told attendees they would be taken to a nearby high school.
The event was organised by the American Freedom Defense Initiative, which has campaigned against the building of an Islamic centre near the World Trade Center site in New York.
Sunday’s meeting included a $10,000 prize for a cartoon of the Prophet Muhammad.
The same conference centre in Garland hosted an event in January to raise funds for building a local Islamic centre; that meeting was picketed by opponents.
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.