There are number of reasons for this beef. From what i have read from nadeem farooq paracha, it was their political beliefs that caused a rift in them as Sarfraz nawaz used to be hardcore jiyala in his youth and drank himself to death upon hearing of bhutto's hanging.
He was active in pakistani politics in late 80's and held positions in both punjab's provincial government in 1985 & then as advisor in Benazir's government. To give you a brief idea about his personality, think of this man as the punjabi version of Javed miandad. Just like Javed, he is extremely combative, doesn't back of from criticizing when he disagrees with some one and also holds a lot of grudges & counter reacts with harsh below the belt statements. Also he was one of the first un-official whistle blowers about match fixing going on in sharjah in the 80's & ball tampering stuff. I might be wrong but I think before sarfraz started sprouting this match fixing stuff, folks in pakistan or india didnt even know that such a thing existed. Of course he was a bit like Dr shahid masood (Famous Pak Journalist) that he would say stuff like this & explicitly state that i have evidence. When asked for evidence, he would backtrack & take u-turn. Even in 2000's decade, he was the most notorious blamer of them all & would use team's poor performance as an excuse to deliver un-substantiated allegations. After 2007 WC matches, he would say k ye dono matches fix hue hain ur puri team ko ECL me dalo without any solid proofs or evidence whatsoever. Just to clarify, I am not anti-sarfraz nawaz at all. Just telling you how he has conducted himself on TV/News in the last 20-30 years .
So naturally khan would defend himself from such claims in the 80's which would **** him off (I know it sounds dumb but it is a pakistani uncle type of thing getting irritated when the other public figure doesn't publicly accept his supposed faults or tries to wiggle out by diplomacy & then reacting by sling mud at his reputation, Miandad does the same thing nowadays). Also i had read from dawn or tribune once that khan had some issues with BB's government in 1990 and khan has some remarks to the media. Sarfaraz being advisor to PP was no doubt instructed by BB or The Devil Zardari to counter him. So naturally sarfaraz started talking crap about Khan.
Events took a bad turn when khan refused to welcome BB during her trip to Shaukat Khanam in 1994. This angered the dumb jyalas who were the patwaris of the 1970's-1990's. Sarfraz then upped his game & used every below the belt insult for khan including him smoking weed, his drinking, partying, match fixing, ball tampering & lot of bull cringey stuff about the way he ran shaukat khanum.
Secondly as you have seen khan as gone through a huge transformation from lanky teen to playboy to glorious all rounder & all-conquering captain to a populist politician. One of Imran khans' biggest qualities & at the same time biggest flaw is his use of islamic rhetoric in his political career. I mean i am not anti Imran as well but even i hate a former playboy giving lectures like an authority figures on morality & stuff as if he has done nothing wrong. The same mud slinging tactics are now being used in political circles by guys like Maulana Fazl-ur-Rehman since the 1990's & N league since the last 7 years. Their methods aren't too far from what Sarfraz Nawaz started. But I still respect Khan more than any Pak cricketer & don't respect Sarfaraz as much for these cheap shots.
Why i despise sarfaraz is that he went too below the belt with Khan. He was Khan's best mate, so naturally he knew a lot about khan as they always hung out with each other & judging by reading some articles, sarfaraz was a huge party lover like imran as well. But to use this intimate knowledge to spite Immy speaks more of his character more than it does of Khan. Imran on the other hand has always handled himself with grace and has always replied calmly to Sarfraz's Allegation. The below two links will give you an idea of both their personalities.
https://www.dawn.com/news/813461
https://www.independent.co.uk/arts-entertainment/imrans-dangerous-new-game-1615722.html