From songfacts.com (which is a great site for this kind of stuff):
Petty has not said what this is about, but there are 2 common interpretations. It could be about Petty's divorce from his wife Jane, which happened a year before this was recorded. Another possibility is that it is about marijuana, as "Mary Jane" is slang for pot and the lyrics refer to killing the pain, which the drug is known for. Campbell offered this explanation: "My take on it is it can be whatever you want it to be. A lot of people think it's a drug reference, and if that's what you want to think, it very well could be, but it could also just be a goodbye love song."