Adi Yussuf capped an impressive first half showing with the opening goal following good work by Nick Wright but the scores were levelled shortly after the break with the visiting Boro grabbing an equaliser.
The game seemed destined to finish all square but an 88th minute Ben Tomlinson penalty secured the friendly win for the Imps. There was still time for Tomlinson to be denied a second following a superb save before substitute Conner Robinson hit the bar.
Next up is Scunthorpe United who will visit Sincil Bank on Tuesday 30 July in the semi-finals of the Lincolnshire County Senior Cup. Admission prices, which have been set by the Lincs FA, are £6 for adults and £3 for concessions/juniors.
City: Farman, Gray, Boyce, Brown, Newton, Nolan, Power, Rowe, Tomlinson, Wright, Yussuf. Subs: Foster, Fofana, Fairhurst, Sheridan, Thomas, Dixon, Robinson, Preece.