Not sure if it is the first one, but seems a good candidate.
I know it's a lot later, but I was amazed the first time I heard the in-game opening theme with lyrics in Tales of Phantasia (Super Famicom, 1995). I had no idea it existed when I tried the fan-translated ROM, and I was like, wait, you can do that in a SNES game?
Sure it's probably the main reason they needed a (comparatively) high capacity cartridge (6 whole megabytes!), but still, wow.