1–4, The emblems to be used in partaking of the sacrament are set forth;
5–14, Christ and His servants from all dispensations are to partake of the sacrament;
15–18, Put on the whole armor of God.
(Doctrine and Covenants 27, Heading)
First, notice that a "heavenly messenger" met Joseph and gave him the first part of this revelation. Here is the explanation from Joseph's journal:
Early in the month of August, Newel Knight and his wife paid us a visit, at my place at Harmony, Penn; and as neither his wife nor mine had been as yet confirmed, and it was proposed that we should confirm them, and partake together of the sacrament, before he and his wife should leave us.— In order to prepare for this; I set out to go to procure some wine for the occasion, but had gone but <only> a short distance when I was met by a heavenly messenger, and received the following revelation; the first paragraph of which was written at this time, and the remainder in the September following.
Who was this heavenly messenger? Among the candidates identified as "heavenly messengers" are Moroni, Peter, James and John, and John the Baptist.
I don't think it would be Moroni, because verse 5 refers to Moroni in the third person. For the same reason, it would not be John the Baptist (verse 7) or Peter, James or John (verse 12). This is why I think it was probably Nephi or another of the 3 Nephites because their mission is specifically to "tarry" and work with mortals.
People often forget that Joseph met with Nephi, also a heavenly messenger who was probably the messenger who took the abridged plates from Harmony to Cumorah before bringing the plates of Nephi to Fayette. David Whitmer's mother said the messenger identified himself as "Brother Nephi." Joseph said he was one of the 3 Nephites.
This has led to some confusion because the original version of Joseph Smith's history said it was Nephi who visited him. Brigham Young explained in a letter to his son that "There is really no discrepancy in the history about these names. It was Moroni who delivered the sacred records and Urim and Thummim to Joseph, but Nephi also visited him." See the explanation here:
The historical introduction to D&C 14 in the Joseph Smith Papers explains: David Whitmer later recounted that during their journey to Fayette, he, Cowdery, and JS briefly encountered a “pleasant, nice looking old man” whom JS identified by revelation as a heavenly messenger transporting the plates. Whitmer also recalled that soon after their arrival in Fayette, his mother, Mary Musselman Whitmer, was met “by the same old man,” who showed her the plates.
Note 5: "Joseph F. Smith, New York City, NY, to John Taylor et al., [Salt Lake City, Utah Territory], 17 Sept. 1878, draft, Joseph F. Smith, Papers, CHL; Stevenson, Journal, 23 Dec. 1877, 9 Feb. 1886, and 2 Jan. 1887. While the Joseph F. Smith account did not identify the person transporting the plates, Stevenson’s accounts variously identified him as “one of the Nephites” and “one of the 3 Nephites.” (See also [Andrew Jenson], “Eight Witnesses,” Historical Record, Oct. 1888, 621.)"
BTW, it's great to have this note in the Joseph Smith Papers. It demonstrates there is no basis for identifying the messenger as "Moroni" except for Mary Whitmer's grandson's claim that his grandmother was wrong and it had to be Moroni who showed her the plates. Nevertheless, as we all know by now, the Saints book teaches it was Moroni, after all!
The historical introduction to Section 27 is well worth reading to understand the background and composition of the section.
Verse 2 explains an important point: For, behold, I say unto you, that it mattereth not what ye shall eat or what ye shall drink when ye partake of the sacrament, if it so be that ye do it with an eye single to my glory. (Doctrine and Covenants 27:2)
This is one reason why we use water, which some Christians find strange. It also accommodates alternatives to wheat bread.
The non-biblical phrase "it mattereth not" is used 11 times in the Book of Mormon and 7 times in the Doctrine and Covenants. There are a lot of things that "mattereth not" and we should always distinguish between what matters and what does not matter.
Some say the identity of the messenger who showed the plates to Mary Whitmer doesn't matter, but identifying that messenger as Moroni creates a serious doctrinal issue about the nature of resurrected bodies. If a resurrected being (in this case Moroni) can change his shape and appearance, what does it mean to have a resurrected body?
There's a lot more to be said about these sections. For now, let's end with verse 5.
5 Behold, this is wisdom in me; wherefore, marvel not, for the hour cometh that I will drink of the fruit of the vine with you on the earth, and with Moroni, whom I have sent unto you to reveal the Book of Mormon, containing the fulness of my everlasting gospel, to whom I have committed the keys of the record of the stick of Ephraim; (Doctrine and Covenants 27:5)
This is a fascinating passage because it reflects the Eastern Orthodox view of the sacrament as a memorialization of the great feast at the last day.The Eucharist is preeminently the sacrament of Christian hope. It is a foretaste of the eschatological banquet. Saint Thomas Aquinas, in the antiphon for the Magnificat on the feast of Corpus Christi, described the Eucharist as the pledge of future glory. It contains within it the memorial of Christ's Passover and the anticipation of his coming in glory. Filled with hope, Christians celebrate the Eucharist as 'a sacrament of love, a sign of unity, a bond of charity, a paschal banquet in which Christ is consumed, the mind is filled with grace, and a pledge of future glory is given to us' in anticipation.
This is awesome because it shows a path toward harmonizing our understanding with that of the Eastern Orthodox faiths (a topic I've discussed elsewhere in more detail).
I like to think of the Sacrament as looking forward to this future reunion. It adds an important dimension to the ordinance that Section 27 sets out.
Another detail here is the point that Moroni has "the keys of the record of the stick of Ephraim." This passage is the reason I titled one of my books "Moroni's keys" and why I describe my interpretation of Book of Mormon geography as "Moroni's America."
Orson Hyde once delivered a 4th of July sermon in which he referred to Moroni as the "Prince of America." I discussed that here: