It was unclear how much Republican leaders had examined Mr. Peña’s background. Steve Pearce, a former member of Congress who is now chairman of the New Mexico Republican Party, did not respond to requests for comment.

Some Republicans are now bracing for more revelations about Mr. Peña, who was arrested on Monday and charged with criminal solicitation, attempted aggravated battery, shooting at an occupied dwelling, shooting from a moving vehicle and conspiracy. The police called him the “mastermind” behind a conspiracy in which four other men were paid to shoot at the homes of two county commissioners and two state legislators, and said that he personally participated in at least one of the shootings.

As part of their investigation, Albuquerque police detectives said they were also examining whether Mr. Peña used proceeds from narcotics trafficking to finance his campaign, and whether campaign laws were violated. The New Mexico attorney general’s office will lead the investigation into Mr. Peña’s campaign finances, a spokeswoman for the office said on Friday.

The turn in the investigation came after detectives learned through witness interviews that Mr. Peña had identified individuals to funnel contributions from an unknown source into his campaign, according to Gilbert Gallegos, a spokesman for the department. Investigators said they are focusing on José Trujillo, who is also accused in the shootings, and Mr. Trujillo’s mother, Melanie Griego, who are listed as donating a total of $9,150 to Mr. Peña’s campaign.

Police arrested Mr. Trujillo on Jan. 3, shortly after the shooting targeting the Albuquerque home of Linda Lopez, a state senator. In the car that Mr. Trujillo was driving, which the police say is owned by Mr. Peña, investigators say they found 893 fentanyl pills and $3,036 in cash, as well as a firearm matching shell casings found at Ms. Lopez’s home.

Mr. Peña made his first court appearance on Wednesday and did not enter a plea. Roberta Yurcic, a lawyer representing him, said she couldn’t comment on specific aspects of her client’s background, including his military demotions and work history. “The investigation into the charges against my client is ongoing,” she added. “Mr. Peña has a right to a fair trial.”

Javier Martinez, a Democrat whose home was targeted in the attacks after the November election, said that he had “never experienced anything like this before.” Mr. Martinez, who took over this month as New Mexico’s speaker of the House, tied Mr. Peña’s extremism to the election lies voiced by Mr. Trump.