The four, together with journalist Fikrat Faramazoglu, were apprehended during a rally on Baku Boulevard to demand the release of jailed fellow activists, including Baxtiyar Haciyev, Cabbar Savalan, and Rufat Hacibeyli.
The protesters also demanded the resignation of President Ilham Aliyev.
Azerbaijan Popular Front Party youth committee Chairman Abulfaz Qurbanli said Orxan Carciyev and Emin Farhadi were sentenced to eight days and Camil Haciyev and Agasi Shakiroglu to seven days' administrative arrest.
Faramazoglu was released later on May 22.
The protesters were members of the Committee to Protect Rights of Political Prisoners, an umbrella group on which various political parties and public organizations are represented.
Haciyev was sentenced last week to two years in prison on charges of draft evasion. Cabbar Savalan is serving a 2 1/2-year sentence for illegal possession of drugs.
The other activists were detained during opposition protests.
Human rights activists say their sentences were politically motivated.
Read more in Azeri here, including video from the protest