Hastie was born in Wangaratta, Victoria. His father, Peter Hastie, is a minister who had established the Wangaratta Presbyterian Church, and is now principal of the Presbyterian Theological College in Box Hill, Victoria. His family later relocated to Sydney, where Hastie attended The Scots College. Both Hastie's father and paternal grandfather were raised in the Sydney suburb of Vaucluse and were educated at Sydney Grammar School. Hastie's grandparents played a significant role in his teenage years, and he cites his grandfather's service during the Second World War as a motivating factor for joining the Australian Army. Prior to enlisting Hastie studied philosophy, politics and history at the University of New South Wales.
Hastie enlisted in the Australian Army following the September 11 attacks. He cites anti-American sentiment in a university tutorial the day after the attacks as providing the moment he decided to join the military. Hastie completed his degree at the Australian Defence Force Academy followed by officer training at Royal Military College, Duntroon. Hastie then completed Armoured Corps Officer training at Pukapunyal before being posted to the 2nd Cavalry Regiment, then at Robertson Barracks, Darwin. Hastie deployed to Afghanistan as troop commander with Mentoring and Reconstruction Task Force 2 in 2009–2010, commanding a troop of Australian Light Armoured Vehicles on patrols in Uruzgan province.
Hastie completed selection for the Special Air Service Regiment (SAS) in 2010 and was subsequently posted to 1 SAS Squadron in 2012 following completion of his reinforcement training. He deployed with the Australian Special Operations Task Group Rotation XIX in 2013, commanding B Troop who were fighting Taliban in southern Afghanistan. Hastie deployed in late-2014 and 2015 to a Middle East-based role countering ISIL. He resigned his commission in August 2015 after announcing his candidature.
On 28 February 2013 Hastie and other SAS soldiers were in heavy contact with Taliban in Shahidi Hassas District during an operation to extract an Afghan National Police patrol under threat from insurgents. During the engagement SAS soldiers were in contact with an American Apache gunship which strafed an insurgent fighting position. The cannon fire accidentally killed two nomad boys who had been tending livestock nearby. An ADF inquiry cleared Hastie and the other Australians of any wrongdoing; however, Hastie said that the boys' deaths were a very sad and tragic consequence of war, and that 'it's an incident that I know all involved hold deep regret, including myself'.
On 28 April 2013 Australian forces were involved in an operation in Zabul province which saw the right hands of three insurgents severed following an engagement. The incident involved the troop Hastie commanded, although he was not present at the time. A SAS corporal remains under investigation with Defence referring the matter to the Australian Federal Police in August 2015. Hastie was cleared of any wrongdoing by an Inquiry Officer's Inquiry, but the incident was brought to public attention in a front-page story in The Age. Several state Labor MPs made crude jokes about the incident via tweets. The behaviour of state shadow parliamentary secretary Darren West and state shadow environment spokesman Chris Tallentire was later condemned by federal opposition leader Bill Shorten.
He later became a member of the Army Reserve, being dismissed in 2016 over his breach of a general ban on participating in political activity in uniform.
The seat of Canning was rendered vacant by the death in office of the Liberal member, Don Randall, triggering the 2015 Canning by-election. During Hastie's campaign, Tony Abbott was replaced as prime minister by Malcolm Turnbull following a leadership spill. Though the Turnbull government was just four days old, Hastie retained the seat for the Liberals, despite having to rely on preferences after a substantial, though dampened, primary (−4.15%) and two-party (−6.55%) swing away from the Liberal government − solidly less than the double-digit swings polls had predicted under an Abbott Government − however, some double-digit swings did eventuate among the northern suburban booths. The Canning Liberal margin was reduced from safe to marginal status. Political analysts agreed the by-election was a "good outcome for both major parties".
Two controversies emerged during Hastie's campaign. In response to the media highlighting incidents in Afghanistan in 2013. Hastie defended the actions of soldiers under his command, saying they had acted with "honour and integrity".
Leading up to the by-election, during an address to the Liberal Party on 22 August 2015 Hastie said that soldiers under his command had acted with "honour and integrity" and strongly criticised Defence's handling of the incident, claiming that Defence has breached its duty of care to the soldier involved by taking nearly two and a half years to investigate the matter. The ADF has not commented on the investigation or Hastie's comments.
A few months after becoming a Member of Parliament, Hastie linked Islam to terrorism, calling for Islam to reform and for the religion to 'cohere with the Australian way of life'. In response to this and statements by other Government MPs, Prime Minister Malcolm Turnbull identified him as having been briefed by ASIO on the dangers of using inflammatory language about Islam.
In the 2016 Federal Election Hastie attracted some controversy by using advertising materials, including an outdoor poster, that featured an image of himself in his army uniform, as he had in the earlier by-election. This was seen by some as a breach of a general ban on participating in political activity in uniform, though it contravened no existing laws. Hastie defied some critics in the defence community, saying his poster would stand "like a stone wall" because "I'm no longer under their authority, I'm the Member for Canning and my ultimate boss is the people of Canning." Regardless, the matter lead to Hastie being dismissed from the Army Reserves. Hastie was re-elected at the election. His result in Canning showed a 5.12% swing against the Liberal Party compared to the 2013 Canning result, however it was a swing to him of 0.97% compared to his result in the by-election result, ten months prior.
In September 2016, Hastie was appointed to the Parliamentary Joint Committee on Intelligence and Security, and was later invited to chair the committee. In that role he has regular contact with security counterparts in Washington.
Hastie opposes same-sex marriage.
Hastie moved to Dudley Park, Western Australia within the Canning electorate in August 2015; prior to this time he lived in Defence housing in Perth. Hastie met Ruth in the United States in 2007 and married her five months later. Their son was born in June 2015.
Hastie was raised a Presbyterian, and is now an Anglican.