The Miranda Rights originated in 1 963 when Ernesto Miranda was arrested and charged with kidnapping and rape. He signed a confession of guilt two hours after police interrogation. Miranda appealed to the supreme court because he had been coerced to give the confession; the police never informed him of right to an attorney.
The ruling stemmed from other similar cases. In the 1961 Mapp v. Ohio case, the court ruled that evidence produced from illegal searches violated the fourth amendment and could not be used as evidence. Another landmark case was the 1963 Gideon v. Wainwright, where the Courts ruled that a defendant has the right to an attorney and will be assigned an attorney should they not be able to afford one. Another notable case was in 1964 was the Escobedo v. Illinois. In this case, the Court's ruled that a suspect has the right to an attorney when interrogated by the police.
The Chief Justice Earl Warren played a major role in the decision basing his argument on th Fifth Amendment. The Fifth amendment states that an individual need not testify against himself. Warren postulated that when a subject is detained, they are inherently intimidated by the environment they are in. Due to this, he reasoned that any evidence produced wouldn't be impartial.