Simon Mensing's header was the difference between the joint First Division leaders as Hamilton beat Morton to reach the Ramsdens Cup semis.
Morton's Paul Di Giacomo opened the scoring from 12 yards in the 10th minute but only eight minutes later Greig Spence volleyed the equaliser.
Douglas Imrie went close for Hamilton, as did Peter MacDonald for Morton, then Mensing headed in Ali Crawford's cross.
Di Giacomo and Imrie hit the woodwork for their respective sides.
Hamilton: Cerny, McAlister, Canning, McLaughlin, Hendrie, Crawford, Chambers, Mensing, Imrie, Spence (Lyle 84), Paterson (McLaren 66). Subs Not Used: Hutton, Gordon, Gillespie.
Goals: Spence 18, Mensing 33.
Morton: Stewart, McCann (Bachirou 22), Evans, Graham, Forsyth, Di Giacomo, McGeouch (Campbell 54), Smyth, Tidser, O'Brien, MacDonald (Jackson 69). Subs Not Used: Deans, Weatherson.
Booked: Forsyth, Evans.
Goals: Di Giacomo 10.
Referee: Stevie O'Reilly