He personally ransacked all her doors, but locked her in a deep palace because of destiny - "You hate me to the core, but only your hatred can keep me alive."
The massacre of the Shen family back then was not out of selfish desire, but to complete the sacrifice of "exchanging lives with heaven" - killing her closest relatives just to force her fate onto his own broken life chart. He hated the injustice of heaven, and even more hated that he had to become the person she hated the most in order to survive.