 Ulil completed his secondary education in Madrasah Mathali'ul Falah, Kajen, Pati, Central Java.This school is led by Ahmad Sahal Mahfudz which sits in the Nahdlatul Ulama leadership board during the period of 1994‑1999.Ulil also studied in Pesantren Mansajul 'Ulum, Cebolek, Kajen, Pati, and Pondok Pesantren Al-Anwar, Sarang, Rembang, all in Central Java.