They detained 13 fans in the Grassmarket area shortly before the match between Rangers and Raith Rovers.
Another six people were arrested before kick-off at the Easter Road stadium and one person was arrested in nearby Albion Road.
Police Scotland said their operation represented a "proportionate" response.
Police officers have intervened following what they described as a minor disturbance before the Ramsdens Cup final in Edinburgh.