The pharmaceutical industry, under fire this election season for rising drug prices, is ramping up a new advertising campaign designed to improve its reputation with lawmakers as it lobbies against any effort to rein in prescription costs.

The sector’s largest trade group, the Pharmaceutical Research and Manufacturers of America, or PhRMA, says it intends to spend several million dollars this year, and 10% more than in 2015, on digital, radio and print ads that emphasize the industry’s role in developing new drugs and advancing...