Context: Malachi ("my messenger") is the last book of the Protestant OT canon, written probably in the 5th century BC, after the return from exile. The book is structured as six disputes or dialogues: God makes a statement, the people question, and God responds with evidence and warnings.
Accusations against worship and the priesthood: Priests who offer blind and lame animals on the altar — would they give that to a governor? (1:8). Who teach wrongly and show partiality (2:8–9). Who divorced their Jewish wives to marry foreign women — "the Lord was witness between you and the wife of your youth" (2:14). The deterioration of worship reflects the moral and spiritual deterioration of the community.
The closing of the OT: Malachi 4:5–6 promises the return of "Elijah the prophet" before the "great and awesome day of the Lord" to reconcile generations. Jesus identified John the Baptist as that Elijah (Matt 11:14; 17:12). This ending creates dramatic expectation — after centuries of prophetic silence, the promise hangs open. The NT begins exactly with John the Baptist in the desert fulfilling what Malachi announced.