Thamsanqa Gabuza wasted a golden chance in the 14th minute when a deep cross from Siyanda Zwane found him unmarked in area, but somehow he headed wide.
The visitors continued to threaten and three minutes later Mzivukile Tom thought he had scored, but his shot was cleared off the line.
The deadlock was broken in the 30th minute when Noah Chivuta went on a great run on the left before squaring for Mashego to side-foot home on the volley.
Stars doubled their lead four minutes before the break when Arrows goalkeeper Pavels Steinbors failed to hold on to a long-range shot, allowing Moeketsi Mvula to bury the rebound.
Muhsin Ertugral’s side started the second half as they had done the first and were rewarded in the 47th minute when Bongi Ntuli controlled a weak shot from Norman Smith on the edge of the six-yard box to slot the ball home.
However, their hopes of a comeback were dashed just two minutes later when Luyola Nomandela made a run behind the Arrows defence to nudge home a long pass from Chivuta.
Ertugral beefed up his attack by bringing on attacking midfielder Mxolisi Macuphu, and it almost paid off a minute later when he found himself face-to-face with Kennedy Mweene, but he drilled his shot wide.
Arrows were unable to threaten more, meaning they are knocked out of the Telkom Knockout as the pressure increases on Ertugral.