‘See, I will send my messenger, who will prepare the way before me. Then suddenly the Lord you are seeking will come to his temple; the messenger of the covenant, whom you desire, will come,’ says the LORD Almighty. - Malachi 3:1
Central to the prophecy of Malachi, the last Old Testament prophet (a century after the exile in Babylon; probably around the time of Ezra and Nehemiah) is the concept of covenant. In a series of 'debates' or disputations, Malachi accuses the people of being unfaithful to the covenant which God made with their ancestors at Sinai.
They clearly think God doesn't love them, but he points them back to the fact that he chose them to be his special covenant people (1:2–3). The problem, in fact, is not with God but with them. Malachi challenges their half-heartedness, expressed in their second-rate offerings and their lack of commitment to human covenants, particularly marriage.
Malachi also points forward to a day when God would be worshipped around the world (1:11) and to the coming of the One who would bring that about (3:1). After the exile, the Jerusalem temple had been rebuilt, but the people sensed that God had not returned to it. Malachi sees his coming as great news for those who trust God (4:2), but judgment for those who don’t. So the Old Testament closes with a sense of great expectation, which would be fulfilled by the coming of Jesus four centuries later.