It is the first time that Spain has admitted elected detainees into parliament. The move was denounced by Catalan separatist leader Carles Puigdemont, a fugitive in Belgium.
Four of the Catalans are lower-house MPs and one is a senator.
After being sworn in they are expected to be returned to prison.
They won seats in the Spanish general election on 28 April which was won by the Socialists but without a majority.
Conservative Popular Party (PP) and centre-right Ciudadanos MPs say they will try to get the separatists suspended from parliament. That would prevent them from attending future sessions.
The five are on trial for taking part in Catalonia's push for independence in 2017.
The five are: MPs Josep Rull, Oriol Junqueras, Jordi Sànchez, Jordi Turull and senator Raül Romeva.
Amid applause from some fellow MPs, the Catalan politicians hugged leftist Podemos leader Pablo Iglesias in the chamber of the Cortes (lower house).
Spain's acting prime minister is Pedro Sánchez, the Socialist leader. His party won 123 seats and would need Podemos's 42 seats and 11 more seats from Basque nationalists or Catalan separatists to achieve a majority.
The daily El País says the far-right Vox party leader, Santiago Abascal, made a provocative move by sitting in the seat traditionally reserved for the Socialists' spokesperson.
In last month's election Vox won 24 seats - the most significant result for a far-right force in Spain since the Franco military dictatorship ended in 1975.
Last week Spain's Supreme Court rejected a request from the five Catalan separatist politicians that they be permanently released from jail. It granted them "exceptional" permission to attend the opening session of parliament, but did not clarify if they would be allowed to attend debates.
A dozen leaders of Catalonia's failed 2017 independence bid are on trial in Madrid, facing charges including rebellion and sedition. If convicted, some could face up to 25 years in prison.
The semi-autonomous region of Catalonia held an independence referendum on 1 October 2017, which Madrid had earlier declared to be illegal.
The Catalan separatists declared independence from Spain weeks after the vote, and the Madrid government then imposed direct rule.
Spain's 1978 constitution speaks of "the indissoluble unity of the Spanish nation".
The Catalonia crisis is considered the most serious to hit Spain since the fascist Franco era.
Mr Puigdemont and five of his aides fled abroad to avoid the Spanish judicial crackdown. They face prison if they return to Spain.
More about: Spain