Nisar Ali Khan, a former minister and trusted aid to Nawaz Sharif, described Musharraf as "a totally egocentric gentleman."
Army Chief Musharraf, remembering the shame of over 90,000 Pakistani soldiers captured as POWs in 1971, wanted a quick and easy victory by crossing the LOC and occupying the Kargil Heights whilst it was unoccupied by the Indians - he could not hold onto them and his men were left without supplies. To prevent another humiliation with Indians taking Pakistanis as POWs, he had to beg Sharif to ask the Americans to help negotiate a ceasefire!
No one remembers that the BJP Govt. in India were humiliated by Musharraf since Musharraf's Kargil misadventure put an end to their Lahore Peace initiative to settle the Kashmir issue.
His coup against Sharif was primarily to avoid a court-martial for the Kargil fiasco.