A former financial adviser at Oppenheimer & Co. Inc. was charged on Friday with participating for six years in an insider-trading scheme with his close childhood friend, a former Pfizer Inc. employee.

David Hobson, 47 years old, was arrested Friday morning at his home in Providence, R.I.

Prosecutors say Mr. Hobson orchestrated a yearslong insider-trading scheme with his childhood friend Michael Maciocio, 46, a former Pfizer employee. Mr. Maciocio pleaded guilty to conspiracy and securities fraud charges two weeks ago, according to a spokeswoman for the Manhattan U.S. attorney’s office.

A lawyer for Mr. Maciocio didn’t respond to a request for comment. A lawyer for Mr. Hobson couldn’t immediately be identified.

The charges Friday were filed by Manhattan federal prosecutors and by the Securities and Exchange Commission. Authorities didn’t name the employers for Messrs. Hobson and Maciocio, but representatives for Oppenheimer and Pfizer confirmed that they were former employees.

Both companies said they were cooperating with the government.

A Pfizer spokeswoman said in a statement that the company terminated Mr. Maciocio’s employment in 2014 “after identifying the potential improper conduct.”

An Oppenheimer spokeswoman said the company became aware of this issue “some time ago.”

Prosecutors allege Mr. Maciocio earned more than $116,000 in illegal profits from the scheme. Mr. Hobson allegedly made at least $187,000 for himself and at least $145,000 for his customers.

Messrs. Maciocio and Hobson grew up together in Rhode Island, where they played Little League baseball and attended the same high school, authorities said.

Mr. Maciocio’s role at his employer was to evaluate the company’s capacity to manufacture certain drug compounds, according to authorities. Since 2008, Mr. Maciocio allegedly began sending Mr. Hobson inside tips about potential deal activity between Pfizer and companies that included Medivation Inc., Ardea Biosciences Inc. and Furiex Pharmaceuticals Inc.

Pfizer had considered acquiring Ardea in 2010 and 2011, and renewed its interest in 2012. Pfizer ended up abandoning the consideration. Ardea was acquired in 2012 by AstraZeneca PLC.

In 2014, Pfizer was in discussions over a potential acquisition of Furiex. Pfizer decided to abandon the transaction. Furiex was acquired later that year by Forest Labs Inc.

In exchange for the tips, authorities said Mr. Maciocio received “personal benefits,” including investment advice.

Mr. Maciocio often wasn’t told the name of a potential acquisition target, but using clues and through his own research, he would figure out the companies’ identities and ask Mr. Hobson to make trades based off the information, authorities said.

For instance, Mr. Maciocio allegedly learned in May 2008 that Pfizer was pursuing a potential deal with a company code-named “Madeline.” A Pfizer director shared select details about the deal with Mr. Maciocio so that Mr. Maciocio could help determine Pfizer’s ability to manufacture a particular drug, according to the SEC complaint.

Mr. Maciocio figured out that “Madeline” was Medivation and allegedly tipped off Mr. Hobson, according to the complaint. They both allegedly began accumulating Medivation shares as the deal progressed. On the day Pfizer and Medivation publicly announced the deal in September 2008, Medivation shares opened up 30% from the previous day. In total, Mr. Hobson made more than $200,000 for himself and his clients off the announcement, prosecutors said.