e afraid to do something=be unwilling to do something because you are frightened(因为害怕而不敢、不乐意做某事);
be afraid of doing something= be worried or anxious about something that might happen(担心或忧虑某事可能发生).
两者的区别,我写个例句就知道了.
she was not afraid of dancing with strangers,but she was afraid to dance with Mr.Green tonight,because she thought him dangerous.
她不害怕和陌生人跳舞(指在舞会上,表示习惯),但是今晚,她不敢和格林跳舞(很可能格林向她发出邀请,因为她觉得格林是个危险人物,不敢跳舞只是今晚这一次)