The conflict between Ali and Muawiyah had its roots in history. The Hashimites and the Umayyads were cousins and there was usual rivalry and enmity between them. During the time of Abdul Muttalib the leadership of the Quraish vested in the Hashimites. After the death of Abdul Muttalib the leadership passed on to the Umayyads. When the Holy Prophet declared his mission, the Umayyads were in the forefront in opposition to the Holy Prophet. Apart from religious scruples, one of the grounds for such opposition was the apprehension of the Umayyads that if Islam gained strength, the leadership would pass on to the Hashimites. When the Muslims conquered Makkah, the Umayyads had to accept the leadership of the Hashimites. After the death of the Holy Prophet, the Caliphate was held by Abu Bakr and Umar who were neither Hashimites nor Umayyads. The third Caliph Othman was an Umayyad, and during his Caliphate the Umayyads came to be strongly entrenched in power. Indeed one of the main allegations of the rebels against Othman was that he had unduly favored the Umayyads. When after the assassination of Othman, Ali was elected as the Caliph, the Umayyads became uneasy to the transfer of power to the Hashimites. The real aim of Muawiyah was to create difficulties in the way of Ali in order to pave the way for the transfer of power to the Umayyads. The conflict between Ali and Muawiyah was really the recurrence of the old rivalry between the Hashimites and the Umayyads.
Ali, an outspoken and straightforward man, wanted to exert authority over Muawiyah for the simple reason that he had been elected as the Caliph and all authority vested in him. Pressing all his qualities as a shrewd politician into service, Muawiyah proceeded to undermine the authority of Ali by resorting to propaganda against Ali, and adopting other underhand means. He raised the cry for vengeance for the blood of Othman. He displayed the blood stained garments of Othman, and the amputated fingers of Othman's wife Naila in the main mosque at Damascus. This display was backed up by propaganda which raised the emotions of the people to a high pitch. With all the vehemence at his command, he addressed the congregations accusing Ali of complicity in the murder of Othman. He maintained that the erection of Ali as Caliph was irregular as it was held under the pressure of the rebels who had assassinated Othman. When Talha and Zubair defected from Ali and advanced the plea that they had taken the oath of allegiance to Ali under the coercion of the rebels, that furnished Muawiyah another argument for criticizing Ali. When Talha and Zubair were killed at Basra, Muawiyah presented them as martyrs who had given up their lives in seeking vengeance for the blood of Othman. He maintained that Ali was not merely involved in the murder of Othman, he was guilty of the murder of thousands of Muslims including Talha and Zubair as well. He criticized Ali for the ill treatment of Ayesha.
Muawiyah did not rest content with carrying on propaganda against Ali, he undertook steps to weaken the hold of Ali on the territories held by him. Muawiyah was shrewd enough to see that if Egypt held fast Ali, it could stab a dagger in the back of Syria. Muawiyah therefore directed his efforts towards undermining the influence of Ali in Egypt. At that time Ali had a Governor in Egypt who was very loyal to him, and who held the province well under control. Muawiyah tried to bribe the Governor and win him over to his side. When he did not succeed in this effort, he resorted to intrigues to make Ali suspicious of the loyalty of his Governor. Under some misunderstanding Ali deposed his Governor. That weakened the hold of Ali on Egypt. In order to take advantage of this tactical mistake on the part of Ali, Muawiyah stood in need of an ally who could conquer Egypt for him. He soon found such an ally in the person of 'Amr b Al-'Aas known to history as the "Conqueror of Egypt". He was the Governor of Egypt during the reign of Umar. Othman had deposed him. That created bitterness between Othman and 'Amr b Al-Aas. 'Amr b Al-Aas had in fact incited the Egyptians to rebel against the authority of Othman. He had gone to the extent of challenging Othman that he would raise even all the shepherds of the land against him. Muawiyah in spite of his cry of vengeance for the blood of Othman found no harm in making an alliance with a man who had in fact incited the rebellion against Othman. 'Amr b Al-Aas in spite of his bitter opposition to Othman during his lifetime saw nothing wrong in joining the chorus for vengeance for the blood of the man in whose murder he was indirectly if not directly involved.
Muawiyah realized that if he had to go to fight against Ali, the Byzantines could take advantage of such rift among the Muslims and invade Syria. He, therefore, made peace with the Byzantines on terms favorable to them, and even agreed to pay them an annual tribute.
Muawiyah was also shrewd enough to realize that in case he had to strive for capturing power he must have a strong army at his disposal. He accordingly built a strong standing army. On the other hand, Ali had no large standing army at his disposal and for each campaign he had to raise volunteers.
Since the election of Ali as the Caliph, Muawiyah had been raising the cry for vengeance for the blood of Othman, and all the time had been trying to build up his strength. A year after the election of Ali, Muawiyah was strong enough to take the offensive against Ali.