Media captionEyewitness Stephen Perkins: ''Security was very tight''
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.
"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 police suspected the gunmen's vehicle could contain an "incendiary device" and a bomb squad was at the scene.
A later police statement said the bodies of the gunmen were still lying near the car.
Nearby businesses have been evacuated.
About 200 people were inside the conference centre at the time and were moved to the back of the building before being evacuated using school buses, police said.
The conference centre was locked down after the shooting
The BBC's Alastair Leithead says the event was controversial and provocative.
It was organised by the American Freedom Defense Initiative (AFDI), which has campaigned against the building of an Islamic centre near the World Trade Center site in New York.
The AFDI 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.
Speaking before Sunday's event, Ms Geller told AP news agency that the aim of the contest was to make a stand for free speech.
Sunday's meeting included a $10,000 (£6,600) 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.