information:highlighting, quality:correction
Vedic and epic literature

The title "Leader of the group" (Sanskrit: gaṇapati) occurs twice in the Rig Veda, but in neither case does it refer to the modern Ganesha. The term appears in RV 2.23.1 as a title for Brahmanaspati, according to commentators. While this verse doubtless refers to Brahmanaspati, it was later adopted for worship of Ganesha and is still used today. In rejecting any claim that this passage is evidence of Ganesha in the Rig Veda, Ludo Rocher says that it "clearly refers to Bṛhaspati —who is the deity of the hymn—and Bṛhaspati only". Equally clearly, the second passage (RV 10.112.9) refers to Indra, who is given the epithet ' gaṇapati ', translated "Lord of the companies (of the Maruts)." However, Rocher notes that the more recent Ganapatya literature often quotes the Rigvedic verses to give Vedic respectability to Ganesha.

The Sangam period Tamil poet Avvaiyar (3rd century BCE), invokes Ganesha while preparing the invitation to the three Tamil Kingdoms for giving away in marriage of Angavay and Sangavay of Ceylon in marriage to the King of Tirucovalur (pp. 57–59).

Two verses in texts belonging to Black Yajurveda, Maitrāyaṇīya Saṃhitā (2.9.1) and Taittirīya Āraṇyaka (10.1), appeal to a deity as "the tusked one" (Dantiḥ), "elephant-faced" (Hastimukha), and "with a curved trunk" (Vakratuṇḍa). These names are suggestive of Ganesha, and the 14th-century commentator Sayana explicitly establishes this identification. The description of Dantin, possessing a twisted trunk (vakratuṇḍa) and holding a corn-sheaf, a sugar cane, and a club, is so characteristic of the Puranic Ganapati that Heras says "we cannot resist to accept his full identification with this Vedic Dantin". However, Krishan considers these hymns to be post-Vedic additions. Thapan reports that these passages are "generally considered to have been interpolated". Dhavalikar says, "the references to the elephant-headed deity in the Maitrāyaṇī Saṃhitā have been proven to be very late interpolations, and thus are not very helpful for determining the early formation of the deity".

Ganesha does not appear in the Indian epic literature that is dated to the Vedic period. A late interpolation to the epic poem Mahabharata (1.1.75–79) says that the sage Vyasa (Vyāsa) asked Ganesha to serve as his scribe to transcribe the poem as he dictated it to him. Ganesha agreed but only on the condition that Vyasa recites the poem uninterrupted, that is, without pausing. The sage agreed but found that to get any rest he needed to recite very complex passages so Ganesha would have to ask for clarifications. The story is not accepted as part of the original text by the editors of the critical edition of the Mahabharata, in which the twenty-line story is relegated to a footnote in an appendix. The story of Ganesha acting as the scribe occurs in 37 of the 59 manuscripts consulted during the preparation of the critical edition. Ganesha's association with mental agility and learning is one reason he is shown as scribe for Vyāsa 's dictation of the Mahabharata in this interpolation. Richard L. Brown dates the story to the 8th century, and Moriz Winternitz concludes that it was known as early as c. 900, but it was not added to the Mahabharata some 150 years later. Winternitz also notes that a distinctive feature in South Indian manuscripts of the Mahabharata is their omission of this Ganesha legend. The term vināyaka is found in some recensions of the Śāntiparva and Anuśāsanaparva that are regarded as interpolations. A reference to Vighnakartṛīṇām ("Creator of Obstacles") in Vanaparva is also believed to be an interpolation and does not appear in the critical edition.