Police arrested six people at the scene after responding to the call-out.
Four of those people were passed on to the UK Border Agency on suspicion of immigration offences.
If they are found to have no right to live in the UK following investigations into their cases, action will be taken to remove them from the country.
Police say a 26-year-old woman and a man aged 26, both from Eritrea, were arrested.
Last night the pair were still being held by the UK Border Agency.
A 17-year-old from Eritrea has been passed into the care of social services at Portsmouth City Council.
A 29-year-old man from Sudan who was arrested was later released on immigration bail while his case is considered by the Agency.
The lorry driver, a 40-year-old man, and a lorry passenger, a 38-year-old woman, were also arrested.
They were both questioned on suspicion of committing immigration offences.
However police later released the pair with no further action.
A Hampshire Constabulary spokesman said: ‘Police can confirm officers from Hampshire Constabulary’s Roads Policing Unit were called at 4.15pm on Monday, July 9, to the continental ferry port in Wharf Road, Portsmouth, where four people were found in a compartment underneath a goods vehicle.
‘Six people in total were arrested by police, four of those arrested were passed to the UK Border Agency on suspicion of immigration offences.’
He added: ‘Hampshire Constabulary’s Roads Policing Unit works in close co-operation with the UK Border Agency to tackle reports of suspected immigration offences.’
A spokesman from the UK Border Agency said: ‘If these individuals are found to have no right to remain in the UK once their cases are dealt with, they will face removal.
‘We work closely with the police to tackle illegal immigration and immigration crime.’