In general, it's not straightforward to say. It could be seen as haram if the content of the fantasy novels promotes unethical or immoral behavior that contradicts Islamic values. However, if it's purely fictional and doesn't lead to negative influences, opinions might vary.
The determination of whether writing fantasy novels is haram is complex. It might be considered haram if it involves elements that are clearly prohibited in Islam, such as excessive violence, false beliefs, or disrespect towards religious concepts. But different scholars and communities may have different viewpoints on this matter.
It depends on various factors and interpretations within different Islamic teachings. Some might consider it acceptable if it doesn't go against moral and religious principles, while others might have stricter views.