Sir Keir Starmer has warned China poses "real national security threats to the United Kingdom".
But the prime minister also described China as a "nation of immense scale, ambition and ingenuity" and a "defining force in technology, trade and global governance".
"The UK needs a China policy that recognises this reality," he added in a speech at the Guildhall in London.
"Instead, for years we have blown hot and cold.
"So our response will not be driven by fear, nor softened by illusion. It will be grounded in strength, clarity and sober realism."
Describing the absence of engagement with China - the world's second-biggest economy - as "staggering" and "a dereliction of duty", Sir Keir said: "This is not a question of balancing economic and security considerations. We don't trade off security in one area, for a bit more economic access somewhere else.
"Protecting our security is non-negotiable - our first duty. But by taking tough steps to keep us secure, we enable ourselves to cooperate in other areas."
Sir Keir's remarks come after MPs and parliamentarians were warned last month of new attempts to spy on them by China.
And they follow the collapse of a prosecution of two people suspected of spying on behalf of China.
That case led to controversy over how the government under Labour responded to the Crown Prosecution Service's requests for evidence.
At the time, Sir Keir sought to blame the previous Conservative government for the issues, which centred on whether China could be designated an "enemy" under First World War-era legislation.
Meanwhile, Sky News understands the prime minister is set to approve plans for a controversial Chinese "super embassy" in central London.
Read more:
China has 'no interest' in spying on UK following latest accusations
MI5 spying warning to parliamentarians aims to send signal to China
A final decision on the planning application for the former Royal Mint site near the Tower of London is due on 10 December, after numerous previous delays.
Sir Keir is also understood to be preparing for a likely visit to China in the new year.
Since he was elected last year, Sir Keir has been active on the world stage, trumpeting deals with the US, India and the EU and leading the "coalition of the willing" in support of Ukraine.
But he has also faced criticism from his opponents, who accuse him of spending too much time out of the UK attending international summits rather than focusing on domestic issues.
Sir Keir offered a defence of his approach, describing it as "the biggest shift in British foreign policy since Brexit" and "a decisive move to face outward again".
While saying he would "always respect" the Brexit vote as a "fair, democratic expression", he said the way the UK's departure from the EU had been "sold and delivered" was "simply wrong".
He said: "Wild promises were made to the British people and not fulfilled. We are still dealing with the consequences today."
In his speech on Monday, the prime minister accused opposition politicians of offering a "corrosive, inward-looking attitude" on international affairs.
Taking aim at those who advocate leaving the European Convention on Human Rights or NATO, he said they offered "grievance rather than hope" and "a declinist vision of a lesser Britain".
Sir Keir said: "Moreover, it is a fatal misreading of the moment, ducking the fundamental challenge posed by a chaotic world - a world which is more dangerous and unstable than at any point for a generation, where international events reach directly into our lives, whether we like it or not."
He added: "In these times, we deliver for Britain by looking outward with renewed purpose and pride, not by shrinking back. In these times, internationalism is patriotism."
Responding to the prime minister's speech, shadow foreign secretary Dame Priti Patel said: "From China's continued flouting of economic rules to transnational repression of Hong Kongers in Britain, Starmer's 'reset' with Beijing is a naive one-way street, which puts Britain at risk while Beijing gets everything it wants.
"Starmer continues to kowtow to China and is captivated by half-baked promises of trade.
"Coming just days after the latest Chinese plot to interfere in our democracy was exposed, his love letter to the Chinese Communist Party is a desperate ploy to generate economic growth following his Budget of lies and is completely ill-judged.
"While China poses a clear threat to Britain, China continues to back Iran and Russia, and plots to undermine our institutions. Keir Starmer has become Beijing's useful idiot in Britain."
(c) Sky News 2025: China poses 'real national security threats' to UK, Starmer warns
Girl dies and another seriously hurt after crash involving minibus carrying nine teenagers in Tadcaster
OBR chief Richard Hughes resigns after budget leak investigation
Post Office scandal: Police consider corporate manslaughter charges
Is Starmer continuing to mislead public over the budget?