As China accounted for about 50 percent of Micron's revenue in 2017, the ruling sent Micron shares plunging by 5.5 percent on Wall Street overnight.
The Chinese and Taiwanese companies separately said China's Fuzhou Intermediate People's Court ordered two Micron subsidiaries in China to suspend sales of 26 memory products nationwide, including chips, USB sticks and hard drives.
UMC had filed patent infringement lawsuit against Micron in the mainland China courts in January 2018.
The ruling, which hit shares of Idaho-based Micron and other USA chipmakers on Tuesday, comes amid an escalating trade spat between Washington and Beijing over tariffs.
Micron alleges that UMC agreed to develop DRAM technologies for Jinhua, but without any advanced DRAM processes in house, UMC recruited Micron employees in Taiwan to get hold of Micron's DRAM-related trade secrets.
MU, -1.24% shares fell Tuesday following a report that a Chinese court blocked the sale of memory products from the chipmaker in China.
Commenting on the decision, co-president of UMC Jason Wang, said: "UMC is pleased with today's decision".
It also comes as China investigates Micron and its South Korean rivals over price-fixing allegations, amid a surge in prices of dynamic random access memory (DRAM) chips. Joel Poppen, Micron's general counsel, added that it "will continue to aggressively defend against these unfounded patent infringement claims while continuing to work closely with its customers and partners".
UMC, a contract chip manufacturer, plans to list its China operations on the Shanghai Stock Exchange.
In its civil complaint in December, Micron accused UMC of attempting to recruit high level personnel in Taiwan and entice former staff at Micron Taiwan to steal files which could help Jinhua, at the time little-known, to jumpstart China's campaign of developing its own technology for chips.
Li Yiqiang, a partner at law firm Faegre Baker Daniels, told Reuters that normally, Chinese courts set a very high bar for granting injunctions in complex patent infringement cases, but the trade tensions may have given the court more leeway in this case.
UMC shares rose as much as 3.9 percent on Wednesday, before erasing a chunk of the gains to be up 1 percent.
The products impacted by the ban are the ones that Micron sells through retail outlets and represents a small portion of the chipmaker's revenue, Morgan Stanley analysts said in a client note.
Other chipmakers also gained. The Fuzhou Court issued this preliminary ruling before allowing Micron an opportunity to present its defense.
According to Wang, Micron now supplies SSD modules to Alibaba, China's largest e-retailer; Huawei, the world's third-largest smartphone maker; Tencent Holdings, a Chinese conglomerate providing internet and telecommunications services; and Baidu, China's largest search engine.