Sorcery of Thorns by Margaret Roberson
Sixteen-year-old Elisabeth is a foundling, raised in one of the Great Libraries, repositories of magical books called grimoires, which contain classified information and can transform into grotesque monsters. A favorite of the library's director, Elisabeth dreams of becoming a warden-librarian who protects the kingdom from grimoires. Then the director is found brutally murdered, and Elisabeth is accused of the crime. Taken for questioning in the capital, Elizabeth develops a relationship with both her captors, sorcerer Nathaniel Thorn and his demon servant, Silas. It's a slow-burn romance for Nathaniel and Elisabeth, for Elisabeth's preconceptions about sorcerers run deep and are not without cause.