We consider networks of dynamical units that evolve in time according to different laws, and are coupled to each other in highly irregular ways. Studying how to steer the dynamics of such systems towards a desired evolution is of great practical interest in many areas of science, as well as providing insight into the interplay between network structure and dynamical behavior. We propose a pinning protocol for imposing specific dynamic evolutions compatible with the equations of motion on a networked system. The method does not impose any restrictions on the local dynamics, which may vary from node to node, nor on the interactions between nodes, which may adopt in principle any nonlinear mathematical form and be represented by weighted, directed or undirected links. We first explore our method on small synthetic networks of chaotic oscillators, which allows us to unveil a correlation between the ordered sequence of pinned nodes and their topological influence in the network. We then consider a 12-species trophic web network, which is a model of a mammalian food web. By pinning a relatively small number of species, one can make the system abandon its spontaneous evolution from its (typically uncontrolled) initial state towards a target dynamics, or periodically control it so as to make the populations evolve within stipulated bounds. The relevance of these findings for environment management and conservation is discussed.