They surpassed the previous record of 263-5, set by Royal Challengers Bangalore in 2013
Higuain broke the deadlock with a powerful effort seven minutes after the restart for his first goal in any competition since the start of November.
Rugani headed home from Miralem Pjanic's corner with 17 minutes remaining to wrap up victory and seal the Italian champions' position as Group H winners, three points clear of Sevilla.
It was another dismal night for Dinamo, who became only the third team not to score a goal in the competition's group stages.