Nairn is Wellington's main intelligence officer in the second season of the television series. He often uses Sharpe and his men in the course of his operations and is on close enough terms with them to consult with Hagman when Sharpe is believed dead. Although he often puts Sharpe in danger, he is the one largely responsible for faking his death and allowing him to go into hiding and expose Ducos when he is falsely accused of murder.
Nairn has a good relationship with Sharpe, although they have a number of disagreements, notably in Sharpe's Company when Sharpe sees Nairn as putting Teresa in danger by leaving her as a spy in Badajoz. Ironically, it is while on a mission for Nairn, bringing Sharpe information on a French build-up he has found out about, that Teresa is killed by Hakeswill. Nairn clearly sees the advantage of Sharpe's practicality. In contrast, he delights in poking fun at the officious Sir Augustus Farthingdale, seemingly without Farthingdale realising.
In the novels, Nairn is a major-general who originally deputises for Wellington when the latter is away from camp. He appears in the novels Sharpe's Enemy, Sharpe's Regiment and Sharpe's Revenge, with his role in the latter two largely being given to Hector Ross in the television adaptations. In the last of those three novels, he is killed at Toulouse.