On Monday, the union announced that its members had accepted proposals on pay and conditions from the newly nationalised rail operator.
In May, members refused to work overtime or rest days as part of the pay dispute.
This led to hundreds of services being cut from timetables on May 23, with Transport Minister Jenny Gilruth saying it would provide greater certainty.
Aslef members have voted to accept the proposals
Aslef Scottish organiser Kevin Lindsay said: “Following a ballot on the improved offer negotiated with ScotRail, Aslef members have voted to accept the proposals on pay and conditions.
“Aslef is a democratic, lay, member-led union, and I want to thank our members for their engagement and response to the ballot.”
In June, ScotRail offered train drivers a pay increase of 5% following negotiations with the union.
The reduced timetable has affected a number of large events across Scotland, including Scotland’s World Cup qualifier match against Ukraine at Hampden Park and the Trnsmt festival in Gkasgow.
As well as a 5% pay increase, drivers will also get more money for rest day and Sunday working, driving instructor and maternity pay along with a policy of no compulsory redundancies for the next five years.
Commenting on Monday’s announcement, Ms Gilruth said: “I welcome the endorsement of this pay offer by Aslef members.
“We have worked hard in Scotland engaging with the employers to ensure the right offer is put on the table to reach a negotiated and agreed settlement on pay.”
She continued: “It is this Government’s belief that a progressive approach to industrial relations, and an effective voice for workers through trades unions, is at the heart of a fairer, more successful society.
“I would like to thank the negotiating teams at ScotRail for their hard work, and Aslef for negotiating in good faith.
“The Scottish Government will honour the agreement to fund the previously agreed 2.2% through the public sector pay policy, with the remainder being self-funded through increased revenue and roster flexibilities.”