Nick Tortano is an associate of local caporegime Sal Vitaglia. Nick wants to become a made man but has yet to be trusted enough for his first contract killing. As the Boston crime families wither, however, Sal is forced to consolidate his power and advance more men. Recognizing Nick as potentially useful soldier, Sal advises him to show more loyalty and respect to the family. Sal forces him to deliver an apology in order to smooth over relations with another gangster, Tony Matazano, whom he has insulted. Nick reluctantly delivers the apology, though his friend George, a local thug unaffiliated with the mafia, ridicules him for having to show respect to what he views as a contemptible person. Although Tony accepts Nick's apology, tensions remain high between them.
When Nick also delivers an apology to Tony's estranged daughter, Ali, whom his cousin had insulted, Nick and Ali become interested in each other, though she at first rejects his overtures. Ali does not like her father, and she is concerned by Nick's relationship to the Boston crime families. Nick and George rob a local drug dealer that George had befriended, and Nick attempts to give some of the money to his brother, Vito. However, their father, Vincent, refuses to accept it and calls it blood money. Meanwhile, Nick's attempts to romance Ali pay off, and the two begin dating, though she teases him about his stereotypically macho attitude. Sal finally gives Nick a contract, but he is unable to perform the murder. Seeing his hesitation, George performs it for him.
Now a made man, Nick realizes that he no longer has to show as much respect around town. After first shaking down a local business owner to whom he owes money, he revisits Tony and demands a cut of his rumored Eastern European prostitution ring. Although resentful, Tony obliges. Now needing to collect on his outstanding debtors, Tony becomes frustrated with his incompetent underlings, who allowed an anonymous gambler to accrue a $25,000 debt without knowing his personal details. Tony personally takes charge of the collection and threatens to kill the man over the phone. George later calls Nick and directs him to a warehouse, where he reveals himself as the anonymous gambler. Nick is horrified to find that George has kidnapped and beaten Tony, and Nick attempts to talk George out of Tony's murder. After first threatening to kill George, Nick instead kills Tony.
Joe, Tony's second in command, instantly becomes suspicious of George and Nick when Tony disappears. With Sal's blessing, he interrogates Nick's family, and Joe kills Vincent in an altercation. Enraged by his father's murder, Nick attempts to see Sal, though he is stopped by Jerry, who explains that Sal will not see him. Jerry asks whether Nick killed Tony, and when he is met with silence, Jerry advises Nick to leave town immediately. Instead, Nick goes to see Ali and apologizes to her for killing her father. On orders from Sal, Jerry murders Ali, but Nick kills him before he can also be targeted. George insists that they together kill the entire crime family, but Nick rebukes him, and the two go their separate ways. Having lost his father, girlfriend, and best friend, Nick resolves to kill Sal.
Sal is unsurprised to see Nick, and they talk as Nick holds a gun on him. Although Nick blames Sal for the events that have destroyed his life, Sal says that Nick has thrown away a promising career in the Mafia over his connections to friends and family that should not mean anything to him, as they are outside the Mafia. Sal shoots and kills Nick with a hidden pistol. As Sal waits for a clean up crew to dispose of Nick's body, Vito arrives and murders Sal. The film ends as Vito runs off.Ben Barnes as Nick Tortano
Leighton Meester as Ali Matazano
Harvey Keitel as Salvatore Vitaglia
Kenny Wormald as Vito Tortano
Toby Jones as Jerry
Paul Ben-Victor as Vincent Tortano
Ritchie Coster as Tony Matazano
Slaine as George Mullins
William Xifaras as Salvatore's Bodyguard
Jay Giannone as Joe
Armen Garo as Angelo
Billy 'V' Vigeant as Mafia Boss
William Bloomfield as Mob Boss
Michael Yebba as Big Victor
Robert Masiello as Lounge Patron
Emilio Mauro, the screenwriter said of the casting: "I specifically wrote it [the character] for Slaine. Harvey Keitel was an offer. We knew we needed one guy. We went after a bunch and we paid him. Everyone else worked for scale including Toby Jones. Mike Yebaa's in it. Kenny Wormald is in it. Jay Giannone is in it. I knew them all. I wrote Yebba's character for him too. Ben Barnes is gonna show people he can do more. It's a grittier Ben Barnes."
Principal photography began in late November 2012 in Boston, Massachusetts and lasted 15 days. Filming also took place in Providence, Rhode Island. The production budget was about $3 million.
In May 2014, Millennium Entertainment acquired the rights of the film. By the Gun had its world premiere at the 2014 Zurich Film Festival, theatrical premiere in Boston on December 2, 2014, and a limited theatrical release on December 5, 2014. It was released on DVD on January 20, 2015.
John DeFore of The Hollywood Reporter called it a predictable and cliched mafia film. Robert Abele of the Los Angeles Times called it "a strong contender for laziest mob movie ever made". Sam Weisberg of The Village Voice wrote, "By the Gun is a gangster film wholly devoid of suspense, atmosphere, or grit." Tom Meek of WBUR-FM described it as a well-produced film that has too many contrivances in service of advancing the plot.