WASHINGTON — When Representative André Carson was first introduced to Islam, he was a young man watching as his Muslim neighbors escorted older women to the grocery store and scared drug dealers off their streets in Indianapolis.

“I saw that work that Muslims were doing in my community in terms of keeping our community safe,” Mr. Carson, an Indiana Democrat, said in an interview Thursday. “They were doing the work that law enforcement failed to do or really didn’t have a deep interest in doing.”

Now, Mr. Carson, 41, is hearing his religion painted as extremist by Republican presidential candidates. He said he even received a death threat after Donald J. Trump issued his call to bar Muslim immigrants from entering the United States.

While many lawmakers have rushed this week to reject Mr. Trump’s proposal, Mr. Carson and Representative Keith Ellison, Democrat of Minnesota and the only other Muslim in Congress, have offered condemnation from a strikingly personal perspective.