It is likely not illegal, assuming the language of the fee agreement you signed allows for the same. Maybe there was a miscommunication? Fee should also be allowed by the Industrial Commission before it is taken. Done most often when benefits obtained, protected and/or it looks like a final settlement will not be happening for a long, long time, if at all, after a period of representation where no fee was taken.
Best regards,
S. Neal Camak
Lennon & Camak, PLLC
Raleigh, NC