In nonholonomic mechanical systems with constraints that are affine (linear nonhomogeneous) functions of the velocities, the energy is typically not a first integral. It was shown in [17] that, nevertheless, there exist modifications of the energy, called there moving energies, which under suitable conditions are first integrals. The first goal of this paper is to study the properties of these functions and the conditions that lead to their conservation. In particular, we enlarge the class of moving energies considered in [17]. The second goal of the paper is to demonstrate the relevance of moving energies in nonholonomic mechanics. We show that certain first integrals of some well known systems (the affine Veselova and LR systems), which had been detected on a case-by-case way, are instances of moving energies. Moreover, we determine conserved moving energies for a class of affine systems on Lie groups that include the LR systems, for a heavy convex rigid body that rolls without slipping on a uniformly rotating plane, and for an n-dimensional generalization of the Chaplygin sphere problem to a uniformly rotating hyperplane.1 Reference [6], that refers to the moving energy as Jacobi integral (see also Section 2.3), claims that this mechanism can be extended to less symmetrical situations. It is unclear to us to which extent this goal can be achieved: without symmetry, the moving energy exists but is usually time-dependent. For more precise comments see footnote nr. 2 of [16]. We note that while in [17] and in the present article the moving energy is regarded as a first integral of the original system, and is therefore written in the original coordinates, in [6] it is written in the new, time-dependent coordinates.2 While the writing of this article was almost completed, we were informed of the existence of the very recent article [27]. Following the approach in [26], this article considers moving energies from the point of view of Noether symmetries for time-dependent systems-calling them Noether integrals-and generalizes to this context some of the results of [17]; in particular, it proves a statement analogous to Corollary 5.