The move was backed 70-10 in a ballot boycotted by opposition MPs.
Spanish Prime Minister Mariano Rajoy earlier told senators direct rule was needed to return “law, democracy and stability” to Catalonia.
The crisis began when Catalans backed independence in a disputed vote earlier this month.
The Catalan government said that of the 43% of potential voters who took part in the referendum, 90% were in favour of independence. But Spain’s Constitutional Court had ruled the vote illegal.
In all, the motion declaring independence was approved with 70 in favour, 10 against and two abstentions in the 135-seat chamber.
Immediately afterwards, Mr Rajoy called for all Spaniards to remain calm, promising to “restore legality” to Catalonia.
Spain’s Senate is still to vote on whether for the first time to enact Article 155 of the Spanish constitution, which empowers the government to take “all measures necessary to compel” a region in case of a crisis.
It would enable Madrid to fire Catalan leaders, and take control of the region’s finances, police and public media.