We understand the temptation. Lyrics do a wonderful job of expressing emotional intensity, defining a character, indicating an era, and creating an overall ambiance. Unfortunately, lyrics can also do a wonderful job of putting a writer in hot legal waters. That’s because lyrics are protected by copyright laws.
You can (usually) safely use lyrics that were published prior to 1923. Most works published before then are in the public domain and are free for you to use. You should still do your due diligence, though, to be sure no one continues to hold the rights to the song.
But, as far as songs written after 1923 go, you, the writer who wants to use the lyrics (even if only a snippet), will need to seek out and pay for the permission to do so.
It is possible to use lyrics in a non-fiction work, if you abide by the fair use doctrine, i.e., for criticism, comment, news articles, scholarship or research. The U.S. government has a wonderful resource you can refer to on their website, and you can also get detail about fair use there. However, it’s seldom a bad idea to check with an attorney who specializes in copyright law just to be sure you can legally do whatever it is you want to do with someone’s lyrics.
Regardless, let’s go back to what we mentioned earlier in this post: the reason why writers like to use lyrics. We understand the temptation, we really do. But, we’d like you to see that temptation as a challenge to make you become a better writer.
If you’re using a lyric because it invokes a specific era, then why not try to out do the power of that lyric? Why not use your writerly talent and do a better job of creating a nostalgic moment? If you’re using that lyric because it tells the reader something about a particular character in your story, why not step up to the plate and make yourself stretch your creative wings and show us that character with your ability?
In other words, should you find yourself tempted to use a lyric, stop and ask yourself why? Then take that answer and make yourself a better writer with it.