The deposition of particles on a substrate by drying a colloidal suspension droplet is at the core of applications ranging from traditional printing on paper to printable electronics or photovoltaic devices. The self-pinning induced by the accumulation of particles at the contact line plays an important role in the formation of a deposit. In this article, we investigate, both numerically and theoretically, the effect of friction between the particles and the substrate on the deposition pattern. Without friction, the contact line shows a stick-slip behavior and a dotlike deposit is left after the droplet is evaporated. By increasing the friction force, we observe a transition from a dotlike to a ringlike deposit. We propose a theoretical model to predict the effective radius of the particle deposit as a function of the friction force. Our theoretical model predicts a critical friction force when self-pinning happens and the effective radius of deposit increases with increasing friction force, confirmed by our simulation results. Our results can find implications for developing active control strategies for the deposition of drying droplets.