BEIJING—China will lift a ban on making and selling videogame consoles in the country, paving the way for foreign companies like Sony Corp. and Microsoft Corp. to expand in one of the world’s largest videogame markets.

New rules will apply to foreign and domestic console makers, enabling them to manufacture and sell anywhere in the country, according to a statement from the Ministry of Culture released earlier this week. Previously, regulators limited foreign console makers, such as Sony and Nintendo Co., to operate only...