On Jan. 21, 1835, the Prophet Joseph Smith received in the temple at Kirtland, Ohio, a vision pertaining to the administration of the ordinances of the endowment. (D&C 137.)
Although this revelation unfolded the doctrine of salvation for the dead, vicarious ordinances were not performed until four years later at Nauvoo, Ill. In Joseph Smith and the Doctrine and Covenants, Milton V. Backman Jr. and Richard O. Cowan write:"Joseph Smith first taught the practice of vicarious baptisms for the dead on 15 August 1840 at the funeral of Seymour Brunson, a faithful member of the Nauvoo high council. (History of the Church, 4:179; see also D&C 124:132.) He indicated that the saints could now act for their friends who had departed this life, and that the plan of salvation was calculated to save all who were willing to obey the requirements of the law of God.' Soon afterwards, the Saints began receiving this ordinance in the Mississippi River in behalf of deceased loved ones. On a later occasion, Joseph warned:Those Saints who neglect it in behalf of their deceased relatives, do it at the peril of their own salvation.' (History of the Church 4:426.)"
On Jan. 1, 1841, Joseph Smith received a revelation pertaining to the building of Nauvoo, and for building a temple. (See D&C 124.) The revelation gave further instruction pertaining to vicarious ordinances. Brother Backman and Brother Cowan write: "The January 1841 revelation declared that the ordinance of baptism for the dead should be performed in the Lord's house and that he had temporarily allowed the Saints to perform this ordinance outside the temple (such as in the Mississippi River) only in the days of their poverty. He therefore commanded them to provide an appropriate font in the temple. He would grant them `a sufficient time' to accomplish that, during which period he would continue to accept the baptisms performed in the river. (D&C 124:25-32.)
"The Saints took this revelation seriously, so they hastened the construction of the temple. On 2 October 1841 the Prophet emphatically declared: `There shall be no more baptisms for the dead, until the ordinance can be attended to in the Lord's house; and the Church shall not hold another general Conference, until they can meet in said house. For thus saith the Lord!' (History of the Church, 4:426.) Soon the temple basement was covered over, and on November 8, Joseph Smith dedicated a temporary wooden font there. On Sunday, Nov. 21, a large congregation gathered in the temple basement to witness the first baptisms for the dead in this new font. Elders Brigham Young, Heber C. Kimball, and John Taylor baptized forty persons in behalf of their ancestors. Elders Willard Richards, Wilford Woodruff, and George A. Smith performed the confirmation ordinances. Thereafter, the Prophet and members of the Twelve frequently officiated in the temple. (History of the Church 4:446-47, 454, 486.)"