BEIJING—Factories and retailers in China put in weaker-than-expected performances in the first two months of the year, as anemic demand and excess capacity continued to bear down on the world’s second-largest economy.

Industrial production grew 5.4​% in January and February compared with a year earlier, down from December’s 5.9% pace, according to government data released Saturday, and just below the 5.6% forecast by economists polled by The Wall Street Journal. Meanwhile, retail sales clocked 10.2% growth in the two-month...