There is an unmet need for improved fertilizer management in agriculture. Continuous monitoring of soil nitrate would address this need. This paper reports an all-solid-state miniature potentiometric soil sensor that works in direct contact with soils to monitor nitrate-nitrogen (NO3-N) in soil solution with parts-permillion (ppm) resolution. A working electrode is formed from a novel nanocomposite of poly(3-octylthiophene) and molybdenum disulfide (POT-MoS2) coated on a patterned Au electrode and covered with a nitrate-selective membrane using a robotic dispenser. The POT-MoS2 layer acts as an ion-to-electron transducing layer with high hydrophobicity and redox properties. The modification of the POT chain with MoS2 increases both conductivity and anion exchange, while minimizing the formation of a thin water layer at the interface between the Au electrode and the ion-selective membrane, which is notorious for solid-state potentiometric ion sensors. Therefore, the use of POT-MoS2 results in an improved sensitivity and selectivity of the working electrode. The reference electrode comprises a screen-printed silver/silver chloride (Ag/AgCl) electrode covered by a protonated Nafion layer to prevent chloride (Cl-) leaching in long-term measurements. This sensor was calibrated using both standard and extracted soil solutions, exhibiting a dynamic range that includes all concentrations relevant for agricultural applications (1-1500 ppm NO3-N). With the POT-MoS2 nanocomposite, the sensor offers a sensitivity of 64 mV/decade for nitrate detection, compared to 48 and 38 mV/decade for POT and MoS2 alone, respectively. The sensor was embedded into soil slurries where it accurately monitored nitrate for a duration of 27 days.