In this paper we define a class of optimal control problems which we denote "embedded optimal control problems". These are not true optimal control problems since the control system is not locally controllable on the manifold on which it is defined. Despite this, they allow for a well defined associated optimal control problem which does not admit abnormal extremals. We apply Pontryagin's maximum principle to the embedded optimal control problem to derive the generating differential equations for the normal and abnormal extremals. We show that the normal extremal generating equations in a sense contain the extremal generating equations for the associated optimal control problem. We show that this is not the case for the abnormal extremal generating equations. This has applications to the study of the optimal control of systems constrained to a given submanifold of a configuration space, for example the sphere or hypersphere. We apply the theory to three examples in order to illustrate its applicability and to show how it relates to well known results.