A longtime Drug Enforcement Agency agent has turned from fighting narcotics to favoring at least one.

Patrick Moen is set to join private-equity firm Privateer Holdings, which invests exclusively in companies seeking to profit from the growing legal marijuana industry. He will serve as the firm's compliance chief and senior counsel.

Privateer Holdings does not invest in directly in pot growers, processors or distributors in the U.S., for fear of violating federal law. But it does invest in companies indirectly tied to the drug, which has been decriminalized in Colorado and Washington state, and is allowed for medicinal purposes in 18 other states and the District of Columbia, as well as in all sorts of legalized marijuana businesses in Canada.

"The potential social and financial returns are enormous," Moen told The Wall Street Journal. "The attitudes towards cannabis are shifting rapidly.

Moen spent 10 years as a DEA agent, focusing on heroin and methamphetamines in the Pacific Northwest. Prior to joining the agency, he was a police officer and sheriff's deputy in upstate New York—where marijuana has been decriminalized but remains illegal, including for medical purposes. During his law-enforcement career, he said, marijuana prosecutions were rare.

Moen approached Privateer about a job after hearing the firm's CEO, Brendan Kennedy, interviewed on the radio. But when he first visited the pot-trepreneur, Kennedy wasn't happy to see Moen's business card slide across his desk.

"I started to sweat a bit," Kennedy told the Journal. "I thought, 'This is bad.'" Moen went on to reassure him, "This is my résumé."

Privateer has raised $7 million and aims to raise a further $25 million next year.