The novel you're talking about should be called " Transforming Sword and Forging Man." The main character, Yao Jian, accidentally transmigrated and became a sword. He used the small book he left behind to cultivate the way of refining swords and forging people in the other world. His family background was not a duke, but his status in the other world was very high. This novel was not a physical book, but a web novel. The author was Mountain Pepper Fish Meal. I hope you like my recommendation.