Butter an 8-by-8-by-2-inch pan. Sift cocoa powder and sugar into a medium bowl.
Prepare an ice bath. In a small saucepan, combine milk and cocoa-powder mixture with a wooden spoon until a sandy, pastelike texture forms. Add chocolate, butter, and corn syrup. Cook on low heat, stirring constantly, until sugar has completely dissolved, 7 to 10 minutes.
Using a pastry brush, wash down sides of pan with cold water. Increase heat to medium. When a candy thermometer registers 236 degrees remove the pan from heat, and place in ice bath for 5 seconds. Transfer pan to a heat-proof surface, and let sit until thermometer registers 121 degrees, about 45 minutes.
Using a wooden spoon, stir fudge briskly until it begins to lose its sheen, 2 to 3 minutes. Stir in walnuts. Spread fudge into prepared pan with wooden spoon. Using your fingers, smooth fudge. Cover with plastic; chill 30 minutes. Cut into 1-inch squares.