Vaccines work on memory B cells and T cells which remember the pathogen such as virus and bacteria when they are first given artificially. But this is not the case with HIV. HIV is a retrovirus responsible for AIDS and it continuously mutates and changes its structural form so memory immune cells cannot be generated as it appears a new virus every time. Hence the vaccine cannot be designed for HIV.