Disclaimer: I am not a lawyer. I have a long-standing interest in copyright, and I’ve read a lot of opinions from lawyers on the subject. But I am not a lawyer, and this is not legal advice.
The real answer to the question asked in the title of this article is, “It depends.” If the song lyrics are covered by copyright, then no, you can’t use them unless you get permission.
You could ask for permission, of course. You may have to pay a fee, and if the copyright holder is a large corporation, the cost may be prohibitive. On the other hand, if the song is by an independent artist, their price might be more affordable.
What about fair use?
It’s a common claim on the internet that small parts of copyrighted works can be used freely, under the auspices of “fair use”. This is partially true, but it’s more complex than such a simple statement suggests.
For one thing, many legal jurisdictions have no concept of fair use. Some, such as the UK, Canada, and Australia, have the concept of fair dealing rather than fair use. Fair dealing is less flexible and more restrictive than fair use, and in some jurisdictions it is limited to non-commercial uses.
But even in the United States, where the doctrine of fair use is well established, it probably won’t help you. Fair use applies if the copyrighted work is being quoted for a limited use, such as commentary, criticism, education, or parody.
Quoting a song lyric for any of those purposes might qualify as fair use. Having your character sing lines from their favourite song, or using it to set a particular tone, almost certainly isn’t fair use.
If you decide that your usage is fair use, it’s important to note that it does not mean that you have nothing to fear. It simply gives you an argument that you can use in your defence if you get sued. Even a successful defence could be expensive.
What to do instead
One option is to rewrite the relevant section so that it does not need song lyrics, possibly referencing the song without actually quoting it. But if you really want lyrics, there are ways to do so legally and ethically.
You could make up your own lyrics. This has the advantage that they can say exactly what you need to serve your story. There’s no need to write an entire song, unless you need the whole thing.
Or, you could look for songs that have been released under a Creative Commons licence. In this case, the owner retains their copyright, but allows reuse under certain terms. If you’re using Creative Commons licenced material, make sure you read the licence and understand what is required. There are several different licences, all with different requirements.
Finally, if the song lyrics are not covered by copyright, you can use them however you wish. This mostly applies to songs old enough that the copyright term has expired, but occasionally copyright owners will choose to relinquish their rights. This is rare, but it does happen — Tom Lehrer being a notable example.
If you came to this article hoping to find out how to use a specific song’s lyrics in your book, you may be disappointed. But there are legal ways to use song lyrics in your book. Hopefully one of the methods outlined above will work for you.