Trinity finished 16th in the NPL Premier Division last season and had an excellent home record throughout the campaign, losing just twice at the Martin & Co Arena.
But Shaw, who combined his role at Gainsborough with being head of football at Nottingham Trent University, has now decided to step down in order to take up a role with a Football League club.
In a statement released on Thursday, Shaw said: “It is with a heavy heart that I have made the decision to leave my role as head coach of Gainsborough Trinity.
"The past 12 months has been an unforgiving, challenging but brilliant experience that I have committed everything to. We began our tenure unable to retain any players from the previous year, therefore starting day one of pre-season with a squad of zero.
“The recruitment process was difficult and I feel we were still in a trial period up until the end of January. The players that were part of the journey from day one until Whitby away on the last day, this tells you everything about their ability and character, as we were constantly looking to improve the squad.
"I thank the players, whether their contribution was great or small, for their efforts and endeavours this season. They showed honesty and humility throughout and I think we managed to maximise the quality of our squad.
“[Chairman Richard Kane] has been superb with me throughout and I am very grateful for his support, patience and understanding along the way. There are some brilliant people involved at the club and again, I thank them for their support and backing. A special thanks to Kev Johnson for his belief in what we were doing amongst his many other roles at the club, also to Woody for preparing us a magnificent pitch every other week.
“I wish Gainsborough Trinity the best of fortune moving forwards. It is a brilliant football club, has unrivalled support, who I cannot thank enough for the part they played this year, a first class chairman and the potential to be a real force.
"I have an opportunity in the Football League that gives me progression in my coaching career; I am ambitious and feel I have to accept the opportunity.
“I have learnt an incredible amount during my year as Gainsborough’s head coach and I will be forever thankful for the experiences. At 5pm every Saturday, I will be checking the Holy Blues score and I hope this year’s efforts can be built upon and bettered.”
Trinity have now invited applications for the role of head coach, with a closing date of May 17.