In 1913, after his landlord refused his request for more space, newspaper baron William Randolph Hearst bought his entire Upper West Side building for about $950,000. He then constructed a five-story aerie that may have been the largest apartment in the city's history.

Now a portion of that apartment is set to go on the market for $38 million.

The co-op, at the Clarendon on Riverside Drive, will be listed by Paula Del Nunzio of Brown Harris Stevens. The seven-bedroom, 7½ bathroom home has roughly 7,000 square feet over multiple levels, Ms. Del Nunzio said, plus another 7,000 square feet of terraces with Hudson River views. Several rooms have vaulted 15-foot ceilings that were once part of Mr. Hearst's tapestry hall, the agent said.

According to architectural historian Andrew Alpern, Mr. Hearst added a copper mansard to the top of the building, allowing him to create the nearly 100-foot-long, 30-foot-high gallery, where he displayed his collection of medieval tapestries, suits of armor and stained-glass windows. In the 1930s, Mr. Hearst lost the Clarendon to foreclosure, and the building's apartments, including Mr. Hearst's, were divided into smaller units.

The owner is investor and art collector Benedict Silverman. In the 1990s, he and his wife purchased what was left of the penthouse and conducted a major renovation. They are selling because they have other homes and no longer need the apartment.