The deal will run from now until the end of series five on the channel in the autumn.
The creative was devised by Abbot Mead Vickers BBDO and features four 15-second indents showing a box of Maltesers filmed from above. Each box quickly empties as several hands take a single chocolate from the box. As they disappear, a line is revealed at the bottom of the box such as: "mine!" as a hand comes in to take it; "Fancy a cuppa?"; "To be continued", where a handful of Maltesers remain; and "Don't even think about it", when there is only one left.
There are also two five-second indents. Other endlines include "Do Maltesters do home delivery?"; "Let it ring"(after a phone is heard ringing); "Staying in is the new going out" and "You look lovely in tracksuit bottoms".
The sponsorship deal was brokered by Alliance, the sponsorship division of ZenithOptimedia and Channel 4.
A spokesperson for ZenithOptimedia said: "The sponsorship provides the perfect platform for Maltesers to reach its target audience. It aligns the brand with a popular irreverent show, which subscribes to Maltesers' personality of light-hearted fun."
The comedy, now in its fifth series, features Debra Messing and Eric McCormack as the two friends who are perfect for each other except for a couple of minor details, such as Will being gay and Grace being a woman.
If you have an opinion on this or any other issue raised on Brand Republic, join the debate in the .