He called for unity in an address to the party’s Scottish conference in Aberdeen.
Voters decide Scotland’s constitutional future on September 18, and there is also the prospect of a vote on Britain’s place in Europe.
Mr Clegg, the Deputy Prime Minister, said Westminster or Brussels are not perfect but warned against “isolation” as a response.
He compared the leaders of the two nationalist campaigns - SNP leader Alex Salmond and Ukip leader Nigel Farage.
“I’m not going to claim that the SNP and Ukip are the same, obviously there are very big differences,” he told delegates at the Aberdeen Exhibition and Conference Centre.
“But they do both want to bring an end to a partnership between nations that has been forged over time and serves us well, and they both represent the same impulse: to pull away, to break apart.
“Nigel Farage talks about wanting to cause a political earthquake, and the metaphor is apt because there is a clear fault line emerging in British politics today.
“Either you believe that in an uncertain world, we have strength in numbers, as our party believes. Or you think - mistakenly in my opinion - that countries can stand alone and still stand just as tall.
“It’s seductive to some, there’s no doubt about it: breast-beating nationalism always is. But leading a nation is about responding to the world as it is, not as we might like it to be.”
Mr Clegg went head to head with Mr Farage in a televised debate on Europe this week, with a snap poll suggesting the Ukip leader won the argument.
Polls are also getting closer on Scottish independence, with the most recent survey suggesting 42% of people north of the border will vote Yes in six months.
Mr Clegg conceded: “Of course the UK isn’t perfect. Nor is Westminster, nor is Brussels. Institutions, alliances, unions - by their very nature they are living, evolving things, in perpetual need of reform.
“But the response to imperfection is not isolation.
“And the United Kingdom is still the fastest growing economy in the G7. It has clout at the negotiating table, credibility with the markets. We are a leading nation in Europe, an economic superpower - something I am going to fight to defend. And by staying together we can continue to pool our strengths and achieve even more.”