A metaphysics of morals is a philosophy of the a priori principles that dictate the laws of ethics. There is also an empirical branch of ethics, which Kant calls practical anthropology (the study of humans and the way they practice, the way they act). Morals is the pure rational branch of ethics.
"Everyone must grant that a law, if it is to hold morally, that is, as a ground of obligation, must carrywith it absolute necessity," for all rational beings at all times. The intent of this project is to determine, using pure reason, the law for morals.
If pure reason can appraise pure rational principles completely correctly, and it is impossible to take into account all empirical data in any situation, so empirical knowledge is always potentially flawed, then by examining a priori principles of morality with our pure reason, we have a possibility of having unflawed knowledge of moral principles. And since we are rational creatures, with freedom to act, then conformity with the law will be greatly enhanced by knowledge of the law -- if we don't know the law, and only accidentally follow it, we might accidentally stray, whereas if we know it, we can follow it eternally.
A metaphysics of morals is different than a psychology of moral thinking.
"This present groundwork is, however, nothing more than the search for and establishment of the supreme principle of morality, which constitutes by itself a business that in its purpose is complete and to be kept apart from every other moral investigation."
---------
Supreme principle of morality. A principle that, if found, must direct the action of a purely rational being. However, as Kant points out towards the end, we are not purely rational beings, and if we were, we would have no access to moral feelings, the inclination to follow a law or treat others as ends. Also, with modern neurobiology and genetics and a variety of other sources, it can be questioned if a person or a thought can ever be purely rational -- we are all mixed together with different impulses. And even if we determine the supreme principle, its application will be indeterminate, based on nonrational feelings, intuitions, beliefs.