Convicted prisoner George Mwanza has accused the authorities of violating his human rights and those of other HIV-positive inmates by failing to provide them with adequate care.
"I have been prevented from accessing the anti-retroviral drugs and therapy from the clinic," Mwanza - who is awaiting trial for statutory rape - told a courtroom packed with HIV/Aids activists clad in white T-shirts.
Priti Patel of the non-governmental Southern Africa Litigation Centre said the case was "the first of its kind" and could have massive repercussions given the high levels of HIV in Zambia's jails.
More than one in 10 Zambians is HIV-positive.
Mwnaza and his co-plaintiff claim that because of prison staff shortages the government is unable to provide enough wardens to escort them to the clinics and that HIV-positive prisoners received a standard diet of bean and nshima, a thick corn meal porridge that is a staple in Zambia.
HIV sufferers are advised to eat a varied diet of eggs, vegetables, meat, fruits and vegetables.
"The last time I had an egg was in June," Mwanza said.
Mwanza also argued that overcrowding only worsens their condition, exposing them to opportunistic infections.
He has suffered continuous diarrhoea and has contracted tuberculosis twice while being held with 91 other inmates in a cell meant for 20, he told the court.
The capacity of Lusaka Central Prison, where Mwanza is incarcerated, is 200 but it houses more than 1 600 inmates.
At the end of Monday's hearing the judge adjourned proceedings until 11 March.