The actor is shown in one scene hanging off a high-speed moving train and shouting at passersby.
Director Sanjay Gupta told Bollywood Hungama: "John was willing to take the risk and we had put all adequate measures as well to prevent any mishap. But then all of it had to be managed with split-second precision.
"The train was running at a speed of 80 kmph and there was hardly any margin of error. It would be easy on my part to say that it was all a part of the job. However, the truth is that we were terrified. We heaved a sigh of relief once everything went well."
A source added: "Just capturing the sequence was a nightmare as after every few metres there were pillars right next to the tracks. A few inches more and John's head would have smashed on to the pillars.
"There was no option to use a duplicate either since the scene had to be captured in one go with John's body and face visible. Time was running out as permissions were for a limited duration."
Abraham was reportedly reluctant to appear topless for a Race 2 promotional appearance recently.
Co-star Saif Ali Khan credited the famously fit actor for inspiring him to keep fit throughout the film.