By comparing the magnitude of forces, a directed self-assembly mechanism has been suggested previously in which immersion capillary is the only driving force responsible for packing and ordering of nanoparticles, which occur only after the meniscus recedes. However, this mechanism is insufficient to explain vacancies formed by directed self-assembly at low particle concentrations. Utilizing experiments, and Monte Carlo and Brownian dynamics simulations, we developed a theoretical model based on a new proposed mechanism. In our proposed mechanism, the competing driving forces controlling the packing and ordering of sub-10 nm particles are (1) the repulsive component of the pair potential and (2) the attractive capillary forces, both of which apply at the contact line. The repulsive force arises from the high particle concentration, and the attractive force is caused by the surface tension at the contact line. Our theoretical model also indicates that the major part of packing and ordering of nanoparticles occurs before the meniscus recedes. Furthermore, utilizing our model, we are able to predict the various self-assembly configurations of particles as their size increases. These results lay out the interplay between driving forces during directed self-assembly, motivating a better template design now that we know the importance and the dominating driving forces in each regime of particle size.