The disclosure came moments after Tim Lambesis, 32, front man for the group As I Lay Dying, pleaded not guilty to solicitation of murder. A judge set bail at $3 million, required him to wear a GPS monitoring device, and imposed strict travel restrictions.
During a May 7 meeting with the agent, Lambesis was recorded saying he wanted his wife killed, said Claudia Grasso, a San Diego County prosecutor.
The undercover operation was staged after the singer told a man at his gym on April 23 and again on April 24 that he wanted his wife killed, complaining that she was making it difficult for him to see their children and impossible to complete their divorce, authorities said.
Defense attorney Anthony Salerno told reporters that Lambesis did not intend to harm anybody and was apparently set up by the man at the gym.
"Law enforcement was being fed something by someone that I strongly believe was a snitch, was out to save his own skin and was trumping things up, exaggerating things," Salerno said.
The lawyer declined to address specific allegations.
Lambesis was arrested on Tuesday at a store in Oceanside, north of San Diego. If convicted, he could face as many as nine years in prison.
In court Thursday, Lambesis stared straight ahead from behind a glass partition while supporters packed the room.
Grasso said the singer emailed his wife while on tour in August that he didn't love her anymore, wanted to end the relationship, and no longer believed in God. Meggan Lambesis later learned her husband was having an affair and had been involved with "a string of women," the prosecutor said.
Meggan Lambesis, said in divorce papers that her husband had been falling asleep while caring for their three children near a pool and was spending endless hours at a gym and thousands of dollars on tattoos,
The musician's wife also said in the court papers filed last fall that Lambesis toured six months a year and had taken two last-minute trips in a month to see a girlfriend in Florida.
She asked the court to order an expert to examine their music-related businesses and other assets. She also submitted a tax return showing the couple grossed $233,000 in 2010 but did not specify an amount she was seeking for spousal support.
The couple adopted the children ages 4, 8 and 10 from Ethiopia, and Tim Lambesis continued to see them for about 10 hours a week when he was not on tour, even though the couple was no longer living together, according to court documents.
Meggan Lambesis said the couple would try private mediation to work out custody and visitation issues.
Tim Lambesis' comments about his Grammy-nominated band's latest album, "Awakened," indicated he may have been struggling. The singer, who has a degree in religious studies, is known for his growled vocals and philosophical lyrics, which he has said are written from his perspective as a Christian.
The band's website says the album released the same month his wife filed for divorce after eight years of marriage is a "far darker, more pessimistic beast" than previous albums.
"On this record, I wasn't purposefully trying to be negative, but I think sometimes we have to be honest with some of the darker and more difficult times of our lives to get back to that positivity," Lambesis is quoted as saying.
A man who answered the phone at a number listed in the singer's name in Del Mar said the family was not commenting at this time.
As I Lay Dying formed in San Diego in 2000 and has released six albums, including 2007's "An Ocean Between Us," which reached No. 8 on Billboard's charts. A single from the album, "Nothing Left," was nominated for a Grammy for top metal performance.
The band, which plays in an aggressive style that features metal guitar riffs at the furious pace of hardcore punk, was scheduled to tour the country this summer.
Associated Press writer Julie Watson in San Diego contributed to this report.