Shares dropped 2.8 percent to $57.22, however, on investor concerns that the company is becoming increasingly reliant on the drug, which is positioned to become the leading player in a new generation of oncology treatments.

Analysts said some investors were disappointed that the company said it does not plan to spin off its animal health business or do a large, transformational deal.

"While Keytruda continues to do fantastically well, investors are still clamoring for something else besides Keytruda to focus on – thus the push by investors to spin out animal health, and the continual probing about M&A," Jefferies analyst Tim Anderson said in a research note.

The surge in Keytruda sales more than offset steep declines in sales for its shingles vaccine Zostavax and hepatitis C treatment Zepatier.

Keytruda had sales of $1.46 billion in the quarter, ahead of $1.40 billion estimated by analysts, according to Thomson Reuters I/B/E/S.

Keytruda's sales have nearly pulled even with Bristol-Myers Squibb's rival drug Opdivo, which also harnesses the body's immune system to recognize and fight cancer cells. Industry experts give Merck's drug the edge after results from trials for both treatments last month, and Merck said on Tuesday the drug could be its largest seller ever.

Revenue from the drug accounted for nearly 15 percent of Merck's sales.

Merck CEO Ken Frazier said on the company's conference call that while the company did not expect to do transformational deals, it was looking for opportunities to enhance its drug pipeline.

"We have a strong balance sheet. We have the power and the flexibility to do deals at any size and stage, and we're going to continue to look for things that can drive long-term value and growth," he said.

Merck raised its full-year forecast for adjusted earnings to $4.16 to $4.28 per share from its previous forecast of $4.08 to $4.23 per share.

Net income fell 52.5 percent to $736 million, or 27 cents per share, hurt by a $1.4-billion charge related to a collaboration with Eisai Co Ltd, the company said.

Excluding items, Merck earned $1.05 per share, ahead of analysts' estimates of $1 per share. Revenue rose 6.4 percent to $10.04 billion but missed estimates of $10.11 billion.

(Reporting by Tamara Mathias in Bengaluru; Editing by Anil D'Silva and Nick Zieminski)

By Tamara Mathias and Michael Erman