A hierarchical control architecture is presented for energy-efficient control of legged robots subject to variety of linear/nonlinear inequality constraints such as Coulomb friction cones, switching unilateral contacts, actuator saturation limits, and yet minimizing the power losses in the joint actuators. The control formulation can incorporate the nonlinear friction cone constraints into the control without recourse to the common linear approximation of the constraints or introduction of slack variables. A performance metric is introduced that allows trading-off the multiple constraints when otherwise finding an optimal solution is not feasible. Moreover, the projection-based controller does not require the minimal-order dynamics model and hence allows switching contacts that is particularly appealing for legged robots. The fundamental properties of constrained inertia matrix derived are similar to those of general inertia matrix of the system and subsequently these properties are greatly exploited for control design purposes. The problem of task space control with minimum (point-wise) power dissipation subject to all physical constraints is transcribed into a quadratically constrained quadratic programming (QCQP) that can be solved by barrier methods.