In the past, the narrator (Montresor) has, at least in his own mind, been treated badly by Fortunato. We are not really told exactly how Fortunato has mistreated Montresor, but we do know that it has (to Montresor) gotten worse.
We know that, at first, Fortunato had "injured" Montresor many times. This can be seen in the first paragraph of the story. We also know that somehow this has gotten worse because Fortunato has moved on from just "injury" to "insult."
So, in the past, the narrator has been treated badly and that is why he has chosen to seek revenge.
Montressor, the narrator of Edgar Allan Poe's "The Cask of Amontillado," never specifically defines what actions were made against him by Fortunato to earn such hatred. Montressor tells us in the opening sentence that he "bore a thousand injuries" from Fortunato and that a specific "insult" finally led him to plot his revenge. He gives the reader no other clues, however. The two men seem to have been friendly acquaintances at one point, and Montressor continued to treat him in the same manner so as not to arouse Fortunato's suspicions. His revenge, Montressor tells us,
... precluded the idea of risk. I must not only punish but punish with impunity. A wrong is unredressed when retribution overtakes its redresser. It is equally unredressed when the avenger fails to make himself felt as such to him who has done the wrong.
Montressor carefully plans Fortunato's murder. He dismisses his servants for the night to avoid witnesses, makes sure that Fortunato is drunk, and leads him into the catacombs with the promise of a rare bottle of Amontillado--Fortunato's weakness. Montressor also has previously determined Fortunato's final resting place in a far corner of the vast underground burial chamber.