As a child, Julian Bashir fell behind in school, and was evaluated as having learning difficulties. Because of this, his parents, Richard and Amsha Bashir, had him subjected to genetic engineering. The procedure made him mentally superior to most humans, and greatly enhanced his physical abilities. However, because human genetic engineering is illegal in the United Federation of Planets, Bashir and his parents kept his procedure a secret throughout most of his adult life (DS9 episode: "Doctor Bashir, I Presume?").
Bashir finished second at Starfleet Medical, having purposely missed a question on his final exam (DS9: "Distant Voices"). He also took "engineering extension" courses during his time there (DS9:"Armageddon Game"). He had his choice of assignments, but chose Deep Space Nine for the opportunity to practice "frontier medicine" (DS9: "Emissary").
Early on his overly enthusiastic, self-important nature made some members of the crew, such as Miles O'Brien and Kira Nerys, reluctant to spend time with him. However, he eventually becomes friends with O'Brien, Jadzia Dax, and Elim Garak. Bashir falls in love with Jadzia, who goes on to marry Worf. After her death, Bashir joins Worf on a dangerous mission to ensure Jadzia's soul a place in Sto-Vo-Kor.
Bashir's closest friend is O'Brien, and they are frequently shown playing games (like darts) or visiting the holosuite for the recreation of a historical battle. He is also close friends with Elim Garak, with whom he often shares lunch in the Replimat.
During pre-Dominion war tensions, Bashir is kidnapped and sent to a Dominion prison camp and replaced with a shapeshifter ("In Purgatory's Shadow"). His replacement attempts to destroy the Bajoran sun, thereby wiping out Bajor, DS9, and a fleet of Federation, Klingon, and Romulan ships ("By Inferno's Light"). The plan is foiled, and the real Bashir, along with his fellow captives, are freed shortly thereafter. The experience (and his outing as a genetically engineered person) began a slow personality change over the course of the series into a much more somber, dark character.
Alexander Siddig also played his role of Dr. Julian Bashir in the Star Trek: The Next Generation season six episode "Birthright, Part I", a season concurrent to DS9's first season.