A direct relation between the conformal formalism for 2D quantum gravity and the W-constrained KP hierarchy is found, without the need to invoke intermediate matrix model technology. The Kontsevich-Miwa transform of the KP hierarchy is used to establish an identification between W constraints on the KP tau function and decoupling equations corresponding to Virasoro null vectors. The Kontsevich-Miwa transform maps the W(l)-constrained KP hierarchy to the (p', p) minimal model, with the tau function being given by the correlator of a product of (dressed) (l, 1) [ or ( 1, l) ] operators, provided the Miwa parameter n(i) and the free parameter (an abstract bc spin) present in the constraints are expressed through the ratio p'/p and the level 1.