Much depends on exactly how you define Mormon Literature. Excluding the Book of Mormon, however, the first literary works were first published in June of 1832, in the first number of the Evening and Morning Star. That first LDS newspaper included several poems in its first issue, two of which were by LDS authors W.W. Phelps (the newspaper’s editor) and Parley P. Pratt.
Of course, these were the first published. We may never know for sure exactly what was the first work written, since not everything has survived in a dated manuscript form. But I did learn recently, from early Mormon document collector Jon Hajicek, that another Parley P. Pratt poem was written well before the first issue of the Evening and Morning Star was published.