In "1984," Winston Smith's diary acts as a literary device that permits the author, George Orwell, to carry out much of the necessary exposition that advances the story. It also acts as a metaphor for Winston's ultimately hopeless attempts at rebellion, as it is the only outward act of rebellion the character carries out during the early chapters of the book.
Winston's own motivation, as a character, for opening the diary is unclear. The work addresses hypothetical readers of the future who, Smith imagines, live in a world where thought is free and two plus two equals four. It is, in essence, a letter from the age of Big Brother to an unimaginable future when thoughtcrime ceases to be a punishable offense.
In his interior monologue, Smith eventually links the opening of the diary to his budding rebellion against the Party, and he reckons it in a sequence of steps that begin with a single involuntary act of thoughtcrime and lead to his later adultery and conspiracy to join the resistance. As a metaphor, the diary finishes the story while Winston is held at the Ministry of Love and is informed that the diary, a stand-in for his hopes for the future, has been burned.