A sandwich-type spontaneous injection for capillary electrophoresis is proposed in this paper. Three nitrophenols, namely p-nitrophenol, o-nitrophenol, 2,4-dinitrophenol, were chosen as the model compounds to validate the possibility of sandwich-type spontaneous injection. This sandwich-type spontaneous injection for the analysis of the three nitrophenols was performed in three steps. The first step was to fill up the whole capillary with the alkaline background solution of sodium borate (pH = 9.2). The second step was to inject a small volume of n-octanol (approximately 1.47 nL). The third step was to insert the inlet of the capillary into the sample vial where the pH was adjusted to acidic conditions for a desired time period (of less than 42 min). The sample vial was then refilled with background solution reservoir and a high voltage was applied across the whole capillary to enable the capillary electrophoretic analysis. Several experimental conditions influencing the efficiency of sandwich-type spontaneous injection were investigated, such as voltage, volume of n-octanol, cartridge temperature and waiting time for the inlet of the capillary inserted into the sample vial. Experimental results showed that the waiting time was the dominant factor influencing sandwich-type spontaneous injection. The enrichment factors for p-nitrophenol, o-nitrophenol and 2,4-dinitrophenol were 26, 28 and 15, respectively. The corresponding detection limits were 1.9 × 10−6, 5.0 × 10−6 and 1.7 × 10−6 mol L−1. The proposed method was successfully applied to the determination of three compounds in samples of spiked tap water.