Fill a large bowl with ice to create an ice bath for a small saucepan.
Blend coconut milk in a blender until smooth. Pour 8 ounces into a small saucepan and refrigerate remaining 16 ounces in a large mixing bowl.
Warm saucepan of coconut milk over low heat, stirring often, until edges just begin to bubble, about 5 minutes. Stir in grated chocolate and cocoa powder until completely dissolved. Mix in vanilla extract.
Transfer saucepan to the ice bath, stirring constantly and replacing ice as needed. Continue this process until well chilled, 5 to 10 minutes.
Remove the bowl containing 16 ounces of coconut milk from the refrigerator. Whisk in the chocolate mixture. Add agave nectar and mix to incorporate.
Freeze in an ice cream maker according to manufacturer's instructions, about 20 minutes. Transfer to an airtight container and freeze for an additional 1 to 2 hours before serving.