I have heard that Lord Dattatreya has given liberation or spiritual guidance to Parshurama. What is the story behind that?
Parashurama is considered an incarnation of Vishnu and so is Dattatreya. If you mean spiritual guidance or salvation then you might have heard from Tripura Rahasya.
The Tripura Rahasya (त्रिपुरा रहस्य) means The Mystery beyond the Trinity, is an ancient literary work in Sanskrit believed to have been narrated by Dattatreya to Parashurama. It is one of the treatise on Advaita school of classical Indian Metaphysics.
Here are the relevant texts on the interactions between the two.
The Tripura Rahasya expounds the teachings of the supreme spiritual truth. The highest truth was first taught by Lord Shiva to Lord Vishnu. Lord Vishnu incarnated on earth as Sri Dattatreya, Lord of the Avadhutas, who taught this to Parasurama, who later taught it to Haritayana.
The Tripura Rahasya is a dialogue between Lord Dattatreya and Parasurama. It's also called the Haritayana Samhita after its author Haritayana, son of Harita.
In the same wiki, you may also refer the other story of how Dattatreya met Parashurama, who was going towards Ganga along with his mother & father(dead body) on both shoulders. Later he kills Kshatriyas and also challenges Shri Rama.
After encounter with Rama, Parasurama returned crest-fallen and on his way met an Avadhuta named Samvarta, the brother of Brihaspati who advised him to seek Dattatreya. Later he encountered Sri Dattatreya who instructed him in the Truth with added injunction that it should be communicated to Haritayana who would later seek the truth from him and so led him to salvation. Parasurama thus realised the Self by the guidance of Sri Datta and dwelt on the Malaya Hill in South India....