Add cocoa to a large bowl, using an electric hand mixer, or bowl of stand mixer with a paddle attachment. Mix through to remove any lumps.
Add softened butter, and mix until well-combined.
Add powdered sugar, 2 cups at a time, mixing slowly to combine, and then speeding up to a medium mixing speed for about 1 minute. Repeat with two additions until all powdered sugar is added.
Next, mix in vanilla and instant espresso, and mix until combined.
Finally, add 1/4 cup of milk and mix for about 1-2 minutes on medium speed to incorporate fully. If frosting appears too dry, add more milk, a tablespoon at a time until it reaches the right consistency. If it appears to wet and does not hold its form, add more confectioner’s sugar, a tablespoon at a time until it reaches the right consistency.