There are laws of nature with which Physics deals and laws of freedom which are the domain of ethics  . Pure knowledge (as opposed to empirical knowledge) is based on a priori principles and it is this pure part of moral knowledge that is the concern of ethics. Here we are dealing with Kantian ethics and the subsequent postulate of God.
Kantian ethics can be seen as a development of the classical tradition. Central to Aristotlean thought was the connection between virtue and happiness. In his Groundwork some commentators see Kant as refining the classical ethical thought,
‘this [eudemonistic] goal is both pointed to and presupposed by the postulates of the moral law…the crux of the search is the…intelligible and unalloyed…connection between virtue and happiness’  (italics mine).
Kant’s main revision is illustrated by the conceptual reversal of the relation between virtue and happiness. To Aristotle, happiness was the chief end of ethics. Kant proposes that happiness can not be seen as an end in itself:
‘What is the chief end of man?…the more a cultivated reason deliberately devotes itself to the enjoyment of life and happiness, the more the man falls short of contentment…reason’s proper function must be to produce a will good in itself and not one good merely as a means’  (italics mine).
Central to Kant’s moral theory is that there is an objective moral law. Our moral obligation to do what we ought to do is not based on our individual and subjective estimate of what is right but that there exist absolute moral rules. Kant rejects ethical relativism and asserts that societal differences merely mask common principles. This principle is called the universability maxim. An act is moral if it conforms to this principle. To Kant, God himself approves an action because it is right in and of itself rather than being right because God commands it  .
‘Everyone knows that there are some things which he ought to do and some things which he ought not to do. And if one asks how man comes by this knowledge, the answer is that the distinction [between ought and ought not]…involves a principle of volition [the will]’ 
Kant is here postulating the autonomy of the moral agent  . The moral act is one undertaken without interference or constraint. The degree of moral responsibility depends on the degree of freedom exercised. If the act is one you ought to perform, a person is free to choose whether to do it or not. Thus, they can choose to perform a moral act:
‘Man himself must have made himself…in a moral sense, whether good or evil…otherwise he could not be held responsible for it’  .
If you can not do it, there is no sense in saying you ought to do it.
Kant describes that we autonomously impose on ourselves what we ought to do because it is the rational thing to do. Man is never obligated to do that which he is commanded, even when that command is deemed to have come from God. Fidelity to God’s will, if imposed on free men as duty, is immoral because it contravenes the imperative of duty that the moral laws are independent of any law giver  .
He calls this the categorical imperative . That which is good in itself and the highest good he calls the summum bonum  . It is this end to which all moral subjects are obligated to act. However, Kant argues that this is not possible within a single lifetime and so he postulates that immortality is required to achieve that which he is obligated to do.
Kant then goes on to define the bonum consummatum which connects happiness and virtue. The greater good, he proposes, is that Man should not be made unhappy by the pursuit of the highest good. Happiness should be proportional to virtue.  However, Kant observes that this is not our moral experience as men and that God must be the agency that reconciles these two requirements. There is no natural connection between virtue and happiness so there must be a supernatural one.
In other words, God is postulated to give morality context and meaning. Without God, the absurdum practicum remains  . The moral law demands justice and God is the ultimate arbiter  . Only the postulate of God can make the moral law rational: that which we ought to do.
‘..We are at the same time subjects [to the moral law] in it, not sovereigns, and to mistake our inferior position as creatures and to deny, from self conceit, respect to the holy law (my italics) is, in spirit, a defection from it even if its letter is fulfilled..’ 
This, however, was not the final resting place of the argument. It takes an interesting development as he wrestles with the problem of radical evil. Radical evil clearly causes a problem for an ethical system based upon his rational analysis of human freedom. Kant finds himself drawn towards the boundary between philosophy and religion:
‘But if a man is to become not merely legally but morally a good man…this can not be brought about through gradual reformation so long as the basis of the maxims [the heart  ] remains impure, but must be effected through a revolution in the man’s disposition…He can become a new man only by a kind of rebirth, as it were a new creation…a change of heart’  (italics Kant’s)
In his final work, the Opus Posthumum he can be seen to take the philosophical fork at this juncture to clarify the connection between ‘ought implies can’ and the postulate of God. It shows a substantial and inconclusive refinement and revision which can be seen as his awareness that his argument may be seen as inconsistent with his own methodology  .
As Kant develops his moral argument he is concerned with what the psalmist calls “truth in the inward parts”  . It is with motive rather than goal that he defines moral actions. He arrives at his postulate of immortality and God by considering the categorical imperative (“duty”) as known a priori but synthetic  . Thus, he is not attempting to prove the existence of God but arrives at the conclusion that only God can make sense of our moral experience.
 Lehmann, P.L., Ethics in a Christian Context, pp172-3, SCM, 1963
 Ibid p174
 Kant, I., Fundamental Principles of the Metaphysics of Morals, quoted in Lehmann op cit, p176
 Ramsey, I.T. (Ed), Christian Ethics and Contemporary Philosophy, p228, SCM, 1966.
 Kant, I., Metaphysic of Morals, quoted in Lehmann, op.cit, p179.
 Everitt, N., The Non-Existence of God, p136, Routledge, 2004.
 Kant,I., Religion within the limits of reason alone, trans Greene, T.M. and Hudson, H, 1934
 Ramsey, I.T., op.cit, p237
 Kant, I., Critique of Practical Reason, quoted in Lehmann, op.cit, p174.
 Everitt, op.cit, p136.
 Ramsey I.T., op.cit, p244.
 Russel, B., History of Western Philosophy, p682, Routledge, 1992.
 Kant, I., Critique of Practical Reason, quoted in Lehmann, op.cit., p181
 Kant uses this intentionally biblical religious term in his Religion within the Limits of Reason alone to abstract the will’s capacity according to its natural propensity to adopt or not to adopt the moral law into its maxim. Quoted in Lehmann, op. cit., p183.
 Kant, I., ibid., quoted in Lehmann, op.cit, p183. This conclusion bears a remarkable resemblance to 2 Cor 5,17 which is a cornerstone of post-Reformation Christian thought.
 Palmer, M., The Question of God, p249, Routledge, 2001.
 cf Ps 51,6
 Russel, op. cit., p683.