History of Hokkien language
Hokkien is a dialect belongs to the Minnan Chinese, one of the eight major Chinese Han languages. Throughout the years, academics have posed different views towards the origins of this dialect. It has been told that Hokkien was originated from Baiyueyu (百越語) , Gushangyu (古商語), Official language in Tang dynasty (唐朝官話) and Hok lok (河洛語). Nevertheless, it is commonly seen as a hybrid of Quanzhou dialect(泉州語) and Zhangzhou dialect(漳州語).
During the End of Han Dynasty, also called the Three Kingdoms Period, there was a constant warfare taking place in Central Plain(中原) of China. The refugees of Northern China swarmed to Fujian after the Disaster of Yongjia(永嘉之禍). Due to a large number of Han people migrated in the Fujian regions, they brought the old Han accent there. As a result, the language of the indigenous tribe Baiyue in Fujian was varied and gradually evolved into the Quanzhou dialect(泉州語), the earliest form of Minnian dialect. However, some scholar suggested that the language was extinct long before (around 700 years) the military force came. So, there might not be any connection between the Baiyueyu and the ancient Minnan . 
Later in Tang dynasty, Chen Zheng (陳政) and his son Chen Yuanguang (陳元光) led a military expedition to pacify the rebellion in Fujian. During their settlement in Zhangzhou, they introduced the Middle Chinese phonology of northern China during the 7th century into the region. Then in the 10th century, Wang Chao(王潮) and his brother led a military expedition to pacify the Huang Chao rebellion. They brought the commonly spoken Middle Chinese phonology of Northern China into Zhangzhou. The two waves of migrations brought the Northern Chinese language into the Fujian region. Hence, it gradually evolved the language into Zhangzhou dialect(漳州語).
Thank for the establishment of Xiamen as the main port of trading in southeastern China, a common language had to be spoken between businessmen and peasants for easy trading. Therefore, the combination of these two dialects - Quanzhou dialect and Zhangzhou dialect were mixed rapidly and gradually it became the Amoy or Xiamen dialect.
Since all these dialects are widely spoken in Min regions, and the Hakka people called Minnan people as “hok-lo” in the past, for this reason, the dialect spoken by people of Minnan regions is named as Hokkien.
 吳坤明〈臺灣閩南語之淵源與正名〉，《臺灣學研究第五期》（2008年6月） http://www.ntl.edu.tw/public/Attachment/910289373634.pdf