A flop of an initial public offering by ADT Inc. is the latest black eye for Wall Street's struggling underwriting business.

ADT's shares dropped 12% Friday to close at $12.39 in their first day of trading, capping a tumultuous two-day period for the company and its underwriting team, led by Morgan Stanley and Goldman Sachs Group Inc. On Thursday, the underwriters had priced the IPO at $14, a full $4 below the middle of their target range for the stock, the worst pricing miss for a U.S.-listed IPO that raised at least $1 billion since 2013, according to Dealogic.

The two events show the market had much less of an appetite for the electronic security company's stock than underwriters had thought.

The hiccup comes as Wall Street's equity-capital-markets business is in turmoil. The past two years were among the worst on record for U.S. equity-capital-markets revenue when adjusted for inflation, according to Dealogic, and an ample supply of private capital has meant fewer companies need to tap public markets for cash.

One of the most highly anticipated debuts of the year will be for music-streaming company Spotify AB, which will cut underwriters almost entirely out of the equation. Spotify is planning a rare move to go public by listing directly, simply using three banks -- two of them being Morgan Stanley and Goldman Sachs -- as advisers and paying them much smaller fees.

When Spotify executives have discussed their plans for listing directly rather than having underwriters set a price range, they have pointed to the frequency at which Wall Street banks misprice IPOs and the challenges of getting it right, people familiar with Spotify's listing say.

Bankers describe pricing IPOs as an art, not a science, and they often must adjust the level shares are sold at from the initial targeted ranges. ADT's poor performance stands out among a string of high-profile mispricings in the past year.

"This is about the worst that an underwriter and an issuer can do, not only to misjudge demand but to do so by such an enormous margin," said Ambrus Kecskés, associate professor of finance at York University in Canada's Schulich School of Business. He has published research on direct listings and stock issuance.

In an interview Friday after the start of trading, ADT's CEO and CFO said they were pleased with the outcome of the deal and the underwriters' work on it.

In November, fashion startup Stitch Fix Inc. priced its shares well below its target range and sold fewer shares than planned. One of the worst examples of 2017 was Blue Apron Holdings Inc., which in June sold shares in its IPO at $10 apiece after initially seeking to sell stock between $15 and $17. Still, early declines aren't always an indicator of long-term performance. Stitch Fix shares are trading above their initial range.

From 2010 through 2017, 23% of companies that raised more than $100 million priced below their initial filing range, according to Dealogic data. Last year, of the 129 companies that met that bar, 21% priced below their initial filing range, and 10 of those closed down on their first day of trading.

ADT's decline also stands in contrast to equity and debt markets that have been incredibly hospitable to investors. Major U.S. stock indexes are trading at or near records, and companies issuing debt are able to do so at favorable terms. A market in which investors are pouring money into stocks without worrying much about valuation or fundamentals, coupled with historically few stock market swings, should amount to an ideal backdrop for IPOs, many analysts say.

For ADT, the IPO was a quick turn back to public ownership after private-equity firm Apollo Global Management LLC bought it less than two years ago, combining it with two other security companies it had purchased.

Many people involved in the deal were initially optimistic about pricing ADT shares within the initial target range, according to a person familiar with the offering. The company pitched itself as a services company with a predictable, recurring revenue model, but potential investors said they were concerned about its ability to retain customers and attract new ones. Some were also turned off by the price.

Though Apollo didn't receive as big a payout as initially expected, on paper it still more than doubled the money it had invested, according to a person familiar with the deal.

Write to Maureen Farrell at maureen.farrell@wsj.com and Corrie Driebusch at corrie.driebusch@wsj.com