The Bill of Rights, which is actually the first 10 amendments to the US Constitution, was written by James Madison after the Constitution was ratified on June 21, 1788 and obviously, before he presented his proposal on June 8, 1789 during the First Congress. The US Congress approved 12 of these amendments on September 25, 1789 but the first two amendments were not ratified.
The first amendment had dealt with the number and allocation of the US Representatives but it was not approved. The second amendment that restricted the capability of Congress to raise the wages of its members was not approved at that time but it became the 27th amendment two centuries later.
The Bill of Rights establishes several significant precedents for US citizens, such as the right to religion and free speech, the right to petition the government, and the right to assembly. It also ensures that a citizen will not be tried more than once for the same crime, establishes the rules for what is considered to be due process of law, prohibits self-incrimination, and forbids unreasonable punishment for a crime.
It also limits the rights of the military to take over civilian homes, and protects people from unreasonable methods of search and seizure. The Bill of Rights also declares that the powers that have not been assigned to the federal government belong to the people and the states and that military and civilian justice should have different codes.
It is believed that the Bill of Rights owes its presence to the Anti-Federalists who feared that the President could assume powers like those of a king. They refused to accept the Constitution unless it specified the various rights of the people. To appease their opponents, the Federalists agreed to the inclusion of a Bill of Rights after the Constitution had been ratified and during the First Congress.