Shares of BuzzFeed Inc. gave up sharp early gains on their first day of trading after merging with a special-purpose acquisition company.

The SPAC, 890 5th Avenue Partners Inc., merged with BuzzFeed in a deal that took the media company public. SPACs are shell companies that are essentially piles of cash that trade on the stock exchange. Once they merge with a company, that company takes their place on the exchange. These deals have become a popular way for companies to go public.

The...

Shares of BuzzFeed Inc. gave up sharp early gains on their first day of trading after merging with a special-purpose acquisition company.

The SPAC, 890 5th Avenue Partners Inc. , merged with BuzzFeed in a deal that took the media company public. SPACs are shell companies that are essentially piles of cash that trade on the stock exchange. Once they merge with a company, that company takes their place on the exchange. These deals have become a popular way for companies to go public.

The stock jumped more than 40% at its highs before giving up all the gains and falling more than 10%. By midday Monday, shares traded at $8.61, down from the SPAC’s closing price of $9.62 on Friday.

In the case of BuzzFeed, many investors withdrew their money from the SPAC ahead of its first day of trading as BuzzFeed. Investors withdrew about 94% of the $287.5 million the SPAC raised, according to a securities filing last week. 

The media company also raised $150 million of convertible-note financing as part of the deal. The lower cash proceeds from the deal could pressure BuzzFeed’s balance sheet.

Due to the investor withdrawals and because some existing company shareholders can’t sell shares for several months, only a small chunk of BuzzFeed’s shares were available for trading in the public market. 

Small trading volumes can drive outsize moves in the shares because it doesn’t take a lot of selling or buying of the shares to sway the stock price. Shares of BuzzFeed were volatile Monday morning and were halted twice.

In the cases of some companies that have merged with SPACs, day traders have then been the ones to pile into the stock.

While BuzzFeed’s shares rose Monday, shares of the SPAC fell 2.5% over a three-month span ending last Friday, according to Dow Jones Market Data. BuzzFeed announced in June it had reached a deal to go public through the SPAC deal.

The same day last week that investors in the SPAC approved the deal with BuzzFeed, union staffers at BuzzFeed News staged a walkout amid contract negotiations with the company.

Amrith Ramkumar and Benjamin Mullin contributed to this article.

Private companies are flooding to special-purpose acquisition companies, or SPACs, to bypass the traditional IPO process and gain a public listing. WSJ explains why some critics say investing in these so-called blank-check companies isn’t worth the risk. Illustration: Zoë Soriano/WSJ

Write to Allison Prang at allison.prang@wsj.com