WASHINGTON—A congressional committee and the Massachusetts attorney general are investigating whether millions of bot-generated social-media messages about e-cigarettes have been misleading consumers about safety and health issues.

In information requests to five big manufacturers of vaping products in August, House investigators asked each of the firms whether it had used social media bots to market its products. The House Energy and Commerce Committee request also asked for lists of all the usernames involved, as well as...