It’s worth remembering that the “Star Trek” we all know and love was born of a secondary pilot. Then original pilot — the one with Captain Pike — was rejected for being too cerebral and not action-packed enough. Only Spock (Leonard Nimoy) was carried over from the original pilot into the secondary one with Captain Kirk. It seems Roddenberry needed to invent several characters in a hurry, likely assembling his new ensemble in less time than he had to construct his first. Hence the Enterprise’s engineer didn’t have a name or nationality while auditions were being held.
Doohan was a soldier in the Canadian army during World War II and stormed the Normandy beach on D-Day. In his memoir, “Beam Me Up, Scotty,” Doohan tells the story of how a nervous Canadian sentry accidentally opened fire on him, shooting him in the legs, chest, and right middle finger. A cigarette case blocked the bullet to his chest, but he did lose his finger in the accident. Doohan always kept his right hand turned away from the camera throughout “Star Trek,” so that no one would not notice his injury. He occasionally wore a flesh-colored glove to hide it as well.
It was during his army service, according to an interview with Sci-Fi Online, that Doohan learned his Scots accent. He worked alongside a Scottish soldier from Aberdeen, and his Montgomery Scott voice was largely an imitation of that soldier. Inspired by a military friend, his talent for accents, and his admiration for Scots, Scotty was born. Roddenberry, it seems, merely rubber-stamped all these decisions.
Other small pieces of Doohan’s personal life also began to infiltrate Scotty. According to the same interview with Sci-Fi Online, Scotty was said to subscribe to various technical journals once the “Star Trek” writers learned that Doohan had similar subscriptions in real life.