As a Dravidian language, Tamil descends from Proto-Dravidian. Linguistic reconstruction suggests that Proto-Dravidian was spoken around the third millennium BC, possibly in the region around the lower Godavari river basin in peninsular India. The material evidence suggests that the speakers of Proto-Dravidian were the culture associated with the Neolithic complexes of South India. The next phase in the reconstructed proto-history of Tamil is Proto-South Dravidian. The linguistic evidence suggests that Proto-South Dravidian was spoken around the middle of the second millennium BC, and that proto-Tamil emerged around the 3rd century BC. The earliest epigraphic attestations of Tamil are generally taken to have been written shortly thereafter. Among Indian languages, Tamil has the most ancient non-Sanskritized Indian literature.
Scholars categorise the attested history of the language into three periods, Old Tamil (300 BCE – 700 CE), Middle Tamil (700–1600) and Modern Tamil (1600–present).
The exact period when the name "Tamil" came to be applied to the language is unclear, as is the precise etymology of the name. The earliest attested use of the name is in a text that is perhaps as early as the 1st century BCE.
Southworth suggests that the name comes from tam-miḻ > tam-iḻ 'self-speak', or 'one's own speech'. Kamil Zvelebil suggests an etymology oftam-iḻ, with tam meaning "self" or "one's self", and "-iḻ" having the connotation of "unfolding sound". Alternatively, he suggests a derivation of tamiḻ <tam-iḻ < *tav-iḻ < *tak-iḻ, meaning in origin "the proper process (of speaking)".
The earliest records in Old Tamil are short inscriptions from around the 2nd century BCE in caves and on pottery. These inscriptions are written in a variant of the Brahmi script called Tamil Brahmi. The earliest long text in Old Tamil is the Tolkāppiyam, an early work on Tamil grammar and poetics, whose oldest layers could be as old as the 1st century BC. A large number of literary works in Old Tamil have also survived. These include a corpus of 2,381 poems collectively known as Sangam literature. These poems are usually dated to between the 1st and 5th centuries AD, which makes them the oldest extant body of secular literature in India. Other literary works in Old Tamil include two long epics, Cilappatikāram and Maṇimēkalai, and a number of ethical and didactic texts, written between the 5th and 8th centuries.
Old Tamil preserved many features of Proto-Dravidian, including the inventory of consonants, the syllable structure, and various grammatical features. Amongst these was the absence of a distinct present tense – like Proto-Dravidian, Old Tamil only had two tenses, the past and the "non-past". Old Tamil verbs also had a distinct negative conjugation (e.g. kāṇēṉ (காணேன்) "I do not see", kāṇōm (காணோம்) "we do not see") Nouns could take pronominal suffixes like verbs to express ideas: e.g. peṇṭirēm (பெண்டிரேம்) "we are women" formed from peṇṭir (பெண்டிர்) "women" + -ēm (ஏம்) and the first person plural marker.
Despite the significant amount of grammatical and syntactical change between Old, Middle and Modern Tamil, Tamil demonstrates grammatical continuity across these stages: many characteristics of the later stages of the language have their roots in features of Old Tamil.
The evolution of Old Tamil into Middle Tamil, which is generally taken to have been completed by the 8th century, was characterised by a number of phonological and grammatical changes. In phonological terms, the most important shifts were the virtual disappearance of the aytam (ஃ), an old phoneme, the coalescence of the alveolar and dental nasals, and the transformation of the alveolar plosive into arhotic. In grammar, the most important change was the emergence of the present tense. The present tense evolved out of the verb kil (கில்), meaning "to be possible" or "to befall". In Old Tamil, this verb was used as an aspect marker to indicate that an action was micro-durative, non-sustained or non-lasting, usually in combination with a time marker such as ṉ (ன்). In Middle Tamil, this usage evolved into a present tense marker – kiṉṟ (கின்ற) – which combined the old aspect and time markers.
Middle Tamil also saw a significant increase in the Sanskritisation of Tamil. From the period of the Pallava dynasty onwards, a number of Sanskrit loan-words entered Tamil, particularly in relation to political, religious and philosophical concepts. Sanskrit also influenced Tamil grammar, in the increased use of cases and in declined nouns becoming adjuncts of verbs, and phonology. The Tamil script also changed in the period of Middle Tamil. Tamil Brahmi and Vaṭṭeḻuttu, into which it evolved, were the main scripts used in Old Tamil inscriptions. From the 8th century onwards, however, the Pallavas began using a new script, derived from the Pallava Grantha script which was used to write Sanskrit, which eventually replaced Vaṭṭeḻuttu.
Middle Tamil is attested in a large number of inscriptions, and in a significant body of secular and religious literature. These include the religious poems and songs of the Bhakthi poets, such as the Tēvāram verses on Saivism and Nālāyira Tivya Pirapantam on Vaishnavism, and adaptations of religious legends such as the 12th century Tamil Ramayana composed by Kamban and the story of 63 shaivite devotees known as Periyapurāṇam. Iraiyaṉār Akapporuḷ, an early treatise on love poetics, and Naṉṉūl, a 12th century grammar that became the standard grammar of literary Tamil, are also from the Middle Tamil period.
The Nannul remains the standard normative grammar for modern literary Tamil, which therefore continues to based on Middle Tamil of the 13th century rather than on Modern Tamil. Colloquial spoken Tamil, in contrast, shows a number of changes. The negative conjugation of verbs, for example, has fallen out of use in Modern Tamil – negation is, instead, expressed either morphologically or syntactically. Modern spoken Tamil also shows a number of sound changes, in particular, a tendency to lower high vowels in initial and medial positions, and the disappearance of vowels between plosives and between a plosive and rhotic.
Contact with European languages also affected both written and spoken Tamil. Changes in written Tamil include the use of European-style punctuation and the use of consonant clusters that were not permitted in Middle Tamil. The syntax of written Tamil has also changed, with the introduction of new aspectual auxiliaries and more complex sentence structures, and with the emergence of a more rigid word order that resembles the syntactic argument structure of English. Simultaneously, a strong strain of linguistic purism emerged in the early 20th century, culminating in the Pure Tamil Movement which called for removal of all Sanskritic and other foreign elements from Tamil. It received some support from Dravidian parties and nationalists who supported Tamil independence.This led to the replacement of a significant number of Sanskrit loanwords by Tamil equivalents, though many others remain.