Yellen's four-day trip is her first to China as Treasury chief, and she is the second high-ranking US official to visit recently after Secretary of State Antony Blinken last month.
And on Friday Yellen underscored to Chinese Premier Li that the United States was not seeking an economic showdown.
"We seek healthy economic competition that is not winner-take-all but that, with a fair set of rules, can benefit both countries over time," she told Li at Beijing's Great Hall of the People.
The United States has said it is seeking to "de-risk" from China by limiting the world's second-largest economy's access to advanced technology deemed crucial to Washington's national security.
The US has blacklisted a number of Chinese companies to prevent them from accessing the most advanced chips while pushing its allies to follow suit.
But Yellen underlined to Premier Li that while Washington would "in certain circumstances, need to pursue targeted actions to protect its national security", that should not derail ties.
"We may disagree in these instances," she said. "However, we should not allow any disagreement to lead to misunderstandings that needlessly worsen our bilateral economic and financial relationship."
Yellen has stressed during her visit that Washington was not seeking a "wholesale separation of our economies".
"A decoupling of the world's two largest economies would be destabilising for the global economy," Yellen told a meeting with representatives of US businesses at a session hosted by the American Chamber of Commerce in Beijing.
"And it would be virtually impossible to undertake."
Ahead of Yellen's trip, Beijing unveiled new export controls on metals key to semiconductor manufacturing on national security grounds, in the latest salvo in the chips war.
The Treasury Secretary Friday told American businesspeople Washington was "concerned" about the curbs.
"We are still evaluating the impact of these actions, but they remind us of the importance of building resilient and diversified supply chains," she said.