到了公元五、六世纪随着中国与西域民族商业和文化交流的加强, 从中亚地区传入一种曲项琵琶, 当时称作 "胡琵琶"。 其形状为曲颈, 梨形音箱, 有四柱四弦，很像目前在阿拉伯国家常见的乌特琴(Oud 或 Ud)或古波斯的巴尔巴特琴（Barbat）。横抱琵琶用拨子演奏。 现代的琵琶就是由这种曲项琵琶演变发展而来的。
到了唐代（公元7-9世纪）琵琶的发展出现了一个高峰。当时上至宫廷乐队, 下至民间演唱都少不了琵琶, 随成为当时非常盛行的乐器, 而且在乐队处于领奏地位。这种盛况在我国古代诗词中有大量的记载。例如唐代诗人白居易在他的著名诗篇《琵琶行》中非常形象地对琵琶演奏及其音响效果这样的描述:“大弦嘈嘈如急雨，小弦切切如私语。嘈嘈切切错杂弹，大珠小珠落玉盘"。
到了唐代后期琵琶从演奏技法到制作构造上都得到了很大的发展。在演奏技法上最突出的改革是由横抱演奏变为竖抱演奏， 由手指直接演奏取代了用拨子演奏。琵琶构造方面最明显的改变是由四个音位增至十六个（即四相十二品）。同时它的颈部加宽，下部共鸣箱由宽变窄， 便于左手按下部音位。由于以上这俩项改革，琵琶演奏技法得到了空前的发展。据统计琵琶的指法共有五六十种。归纳起来，右手指法分两个系统： 一、轮指系统，二、弹挑系统。左手指法也分两个系统：一、按指系统， 二、推拉系统。
直至公元十五世纪左右，琵琶已拥有一批以《十面埋伏》和 《霸王卸甲》为代表的武曲以及以《月儿高》《思春》和《昭君怨》等为代表的文曲。所谓武曲，其特点是以写实和运用右手技法为主； 所谓文曲，其特点是以抒情和运用左手技法为主。这些乐曲已经成为中华民族音乐的瑰宝、琵琶艺术的珍品。
琵琶传统上是五声音阶。 到了民国时期，已开始按照十二平均律增加琴码，目前标准的琵琶已有八相三十品，琵琶表现力和适应力大大加强，不仅可以演奏传统乐曲，而且可以演奏西洋和现代作品，并且有利于与交响乐队合作。 为后来的进一步发展创造了条件。到了公元二十世纪中后期，琵琶艺术又有了新的发展，在琵琶制作方面，原来用的丝质弦改成了尼龙钢丝弦，有的甚至采用银弦，加大了琵琶音量和共鸣。在技法上左手大拇指以及和弦的运用使琵琶的表现力再次大大提高。由此涌现出一大批融传统音乐和现代作曲理论为一体的优秀的独奏作品， 而且还出现了与各种乐器的重奏以及与小乐队和交响乐队的琵琶协奏曲。 到了二十一世纪琵琶不仅在中国呈现出回复盛唐时期的景象，而且越来越受到世界各国音乐爱好者的关注。不少传统乐曲和当代作品受到中外听众喜爱。可以说，琵琶已开始走向国际乐坛 。
There are considerable confusion and disagreements about the origin of pipa. This may be due to the fact that the word pipa was used in ancient texts to describe a variety of plucked chordophones from the Qin to the Tang Dynasty, as well as the differing accounts given in these ancient texts. Traditional Chinese narrative prefers the story of the Chinese princess who was sent to marry a barbarian king during the Han Dynasty, and the pipa was created so she can play music on horseback to soothe her longings.Modern scholarship however suggests a non-Chinese origin.
The earliest mention of pipa in Chinese texts appeared late in the Han Dynasty around 2nd century CE.According to Liu Xi's Eastern Han Dynasty Dictionary of Names, the word pipa may have an onomatopoeic origin (the word being similar to the sounds the instrument makes),although modern scholarship suggests a possible derivation from the Persian word "barbat" (the two theories however are not necessarily mutually exclusive).Liu Xi also stated that the instrument called "pipa", though written differently in the earliest texts, originated from amongst the Hu (meaning foreigners or barbarians). Another Han Dynasty text also indicates that, at that time, pipa was a recent arrival, although later 3rd century texts from the Jin Dynasty suggest that pipa existed in China as early as the Qin Dynasty (221–206 BCE).An instrument called xiantao , made by stretching strings over a small drum with handle, was said to have been played by labourers who constructed the Great Wall of China during the late Qin Dynasty. This may have given rise to the Qin pipa, an instrument with a straight neck and a round sound box, and evolved into ruan, an instrument named after Ruan Xian, one of the Seven Sages of the Bamboo Grove and known for playing similar instrument. Yet another term used in ancient text was Qinhanzi, perhaps similar toQin pipa, but modern opinions differ on its precise form.
The pear-shaped pipa was likely to have been introduced to China from Central Asia, Gandhara, and/or India.Pear-shaped lutes have been depicted in Kusanasculptures from the 1st century AD. Pipa from the Han Dynasty is referred to as Han pipa, however, depictions of the pear-shaped pipas in China only appeared after the Han Dynasty during the Jin Dynasty in the late 4th to early 5th century. There are therefore differing opinions about the form of the Han Dynasty pipa. Pipa acquired a number of Chinese symbolisms during the Han Dyansty - the instrument length of three feet five inches represents the three realms (heaven, earth, and man) and the five elements, while the four strings represent the four seasons.
Depictions of the pear-shaped pipas appeared in abundance from the Southern and Northern Dynasties onwards, and pipas from this time to the Tang Dynasty were given various names, such as Hu pipa, bent-neck pipa and Kuchean pipa , some of these terms however may refer to the same pipa. Apart from the four-stringed pipa, other instruments introduced include the five-stringed, straight-necked, wuxian pipa, a six-stringed version, as well as the two-stringed hulei.From the 3rd century onwards, through the Sui and Tang Dynasty, the pear-shaped pipas became increasingly popular in China. By the Song Dynasty the word pipa was used to refer exclusively to the pear-shaped instrument.
The pipa reached a height of popularity during the Tang Dynasty, and was a principal musical instrument in the imperial court. During this time Persian andKuchan performers and teachers were in demand in the capital, Chang'an (which had a large Persian community).Many delicately carved pipas with beautiful inlaid patterns date from this period. It had close association with Buddhism and often appeared in mural and sculptural representations of musicians in Buddhist contexts. For example, masses of pipa-playing Buddhist semi-deities are depicted in the wall paintings of the Mogao Caves near Dunhuang. The four and five-stringed pipas were especially popular during the Tang Dynasty, and these instruments were introduced into Japan during the Tang Dynasty as well as into other regions such as Korea and Vietnam. The five-stringed pipa however had fallen from use by the Song Dynasty, although attempts have been made to revive this instrument in the early 21st century with a modernized five-string pipa modeled on the Tang Dynasty instrument.
Pipa fell from favour in the imperial court during the Song Dynasty. During the Ming period, the plectrum was replaced by fingernails, while the horizontal playing position became the vertical (or near-vertical) position by the Qing Dynasty. The early instrument had 4 frets on the neck, but during the early Ming Dynasty extra bamboo frets were affixed onto the soundboard, increasing the range of the instrument. The number of frets gradually increased to 10, 14 or 16 during the Qing Dynasty, then to 19, 24, 29, and 30 in the 20th century. The 4 wedge-shaped frets on the neck became 6 during the 20th century. The 14- or 16-fret pipa had frets arranged in approximately equivalent to the western tone and semitone, starting at the nut, the intervals were T-S-S-S-T-S-S-S-T-T-3/4-3/4-T-T-3/4-3/4, (some frets produced a 3/4 tone or "neutral tone"). In the 1920s and 1930s, the number of frets was increased to 24, based on the 12 tone equal temperament scale, with all the intervals being semitones. The traditional 16-fret pipa is becoming less common, although it is still used in some regional styles such as the pipa in the southern genre of nanguan/nanyin. During the 1950s, the use of metal strings in place of the traditional silk ones also resulted in a change in the sound of the pipa which became brighter and stronger.