How to express: a narrator is narrating an event in the past, and wants to describe an event 2 years before that
In my opinion,


  
  在［那事］之前的兩年……
  在［那事］的前兩年……
  


both mean during the two years before［那事］. Compare


  
  在［那事］之後的兩年……
  在［那事］的後兩年……
  
  
  During the two years (immediately) after［那事］


I suggest


  在［發生Ｘ］的兩年前， 。。。。。。
  
  Two years before X happened, ...




Another technique, which is perhaps not strictly the answer you're looking for, is to make the context very clear in a printed book. Specifically, an occasional first-person narrative should be actually using a different font, akin to English novels sometimes using italics.


  
  
  Excerpt from a digital edition of 紅樓夢 from 國立臺灣大學中文系 (source). The main body of the text is in Song/Ming Typeface, while direct quotes are given in a regular script typeface.


I believe this is why it is difficult for native speakers to answer your query. Printed books may employ the following font styles for different parts of the text:


Song/Ming typeface for the main body;
Regular script typeface for quotes, or a short segment indicating first-person narratives;
Imitation Song typeface for annotations.


In your case, all that's needed for clarification is to print the narration in regular script, and simply write “兩年之前，。。。。。。”.