I found a note in Collins dictionary:
You only use ago when you are talking about a period of time measured back from the present. If you are talking about a period measured back from some earlier time, you use before or previously.
However, here are choices that all sound right to me.
A month earlier/before/ago, our relationship ended. Our
relationship ended a month earlier/before/ago. (I intend to mean
a month before now. I think the sentence order does not significantly
affect the word choice here.)He had died a month before/earlier/ago. He died a month ago. (I
intend to mean a month measured back from the present. I think the
tense does not significantly affect the word choice here.)She had rented the flat some fourteen months
previously/before/earlier.When I make appointments, I will think obsessively about the
appointments several hours previously/before/earlier.
Best Answer
Another way to express this is:
ago is always used in relation to the present time.
He left six months ago. [in relation to today]
He left six months earlier. [in relation to some time in the past]. This works for earlier, before and previously [with an action verb].
You often see in movies, a mistake. The scriptwriters signal a time and use:
Six months ago, in the narration, when they mean six months earlier.