Major consumer and retail companies are looking to mergers and acquisitions to strengthen their portfolios in the face of an anticipated economic slowdown by the end of 2019, according to consulting firm A.T. Kearney.

The sector is expected to address years of anemic growth and shifting consumer demands by rebalancing corporate portfolios to include skill gaps like last-mile delivery, digital capabilities and e-commerce, according to the report, which analysed 2018 M&A data and insights from executives in consumer packaged goods, retail and private equity.

"With high competition, changing consumer preferences and a slowdown economy on the horizon, we're looking at M&A differently," said A.T. Kearney partner Bahige El-Rayes, co-author of the report.

Long-standing companies in the retail and consumer sector are shifting gradually from using dealmaking to build market share and economies of scale to find a way to offer a distinctive customer experience, El-Rayes said.

"Right now, we're seeing weakness in a lot of CPG companies and their portfolios. We see this because their portfolios are not as customer-focused as they should be," El-Rayes said. "Customers are shifting their appetite from big brands to smaller brands, to brands that connect to their values."

The A.T. Kearney report predicts that smaller scale, strategic M&As will characterize the consumer and retail sector in 2019.

There's been a wide stretch of strong M&A activity since the financial crisis, but firms are bracing for an anticipated economic slowdown by year's end. Global political tension, trade wars and slowing economies abroad have contributed to fewer international M&A deals this year.

In 2019, companies struck $913 billion of merger deals on an international scale, down 17 percent from the same period in 2018, according to Dealogic, a financial markets platform.

The consumer packaged goods and retail sector also saw a drop in M&A activity from $392 billion in 2017 to $308 billion in 2018, primarily due to the absence of so-called megadeals, or deals greater than $30 billion. There was no M&A activity in the sector of over $30 billion in 2018, while deals under $30 billion remained stable.

Investors are looking more at deals that will build up a legacy company through acquisition of smaller firms, the report said. The volume of midsize deals fell 4 percent in 2018, but their value rose 6 percent as investors looked to integrate new brands, customers and talent.

"We expect to see more divestitures happening in the next 12 months, as companies are looking to rebalance their portfolio," said Bob Haas, a partner at A.T. Kearney and co-author of the report.

—Graphic by CNBC's John Schoen