James Robert McCrimmon was the son of Donald McCrimmon - a piper, like his father and his father's father. Jamie first appears in The Highlanders, encountering the Doctor, Ben and Polly in the aftermath of the Battle of Culloden in 1746. At the end of the story, Polly suggests that the Doctor take Jamie along with them. Jamie continues to travel with the Doctor even after Ben and Polly leave the TARDIS at the end of The Faceless Ones. He appears in all but the very first Second Doctor serial, The Power of the Daleks, and in more episodes than any other companion, although Tegan Jovanka served with the Doctor for the longest continuous period in terms of years on the series.
Jamie shares a lively, bantering relationship with the Doctor, and during his time in the series sees the arrival and departure of first Victoria Waterfield and finally Zoe Heriot. Jamie, being a product of his time, is always solicitous and gentlemanly towards the women who travel with him. Jamie does not have the background to always understand the situations his adventures with the Doctor take him into, but is quick enough to translate high technology and concepts into equivalents he can understand and deal with. His relationship with the Doctor is not always smooth and in The Evil of the Daleks he comes close to leaving the Doctor whom he feels has been manipulating him and Victoria to discover the human factor for the Daleks, without thinking about the consequences. His battle cry "Creag an tuire", in Scottish Gaelic, translates to "The Boar's Rock." It is similar to Creag an tuirc, the motto of the MacLaren Clan of Scotland.
Together with the Doctor, Jamie encounters Cybermen, Daleks, the Yeti in the London Underground, the Ice Warriors, and many other dangers. Jamie is particularly fond and protective of Victoria, due in part to her being an elegant Victorian lady. For example, in The Ice Warriors Jamie's first priority is to rescue Victoria despite being injured to the point where he can't walk. Jamie is heartbroken when Victoria decides to stay with the Harris family at the end of Fury from the Deep, to the point of even being briefly angry with the Doctor for allowing her to leave (The Wheel in Space). Jamie initially finds Zoe's more modern attitudes and bossy nature irritating, but eventually adopts the same protective attitude disguised by the same bantering he engages in with the Doctor. Often Jamie's simple common sense beats Zoe's strict logic, such as in The Dominators where Jamie realises that the erupting volcano is going to threaten, while the Doctor and Zoe are still congratulating themselves.
During the filming of The Mind Robber, Frazer Hines contracted chickenpox and was replaced for part of the serial by Hamish Wilson. This was written in as part of the story when Jamie is turned into a cardboard cut-out and has his face removed by the Master of the Land of Fiction. The Doctor's first attempt to reconstruct his face is unsuccessful. Eventually Jamie's real face is restored when Hines recovered.
Jamie's travels with the Doctor come to an end on the battlefields of The War Games, when the Time Lords finally put the Doctor on trial for interfering with the universe. For his offences, the Doctor is forced to regenerate and exiled to Earth. Jamie and Zoe are returned to their own time, their memories of the Doctor wiped, save for their first encounters with him. When last seen, Jamie is fighting an English redcoat back on the fields of Scotland.
Frazer Hines returned to Doctor Who as an illusory image of Jamie in the 20th anniversary special The Five Doctors. He also reprised the role in the 1985 serial The Two Doctors alongside Patrick Troughton and Colin Baker as the Second and Sixth Doctors respectively.