iTunes shows 'ghost' songs on my iPhone that are not there, how do I fix this?
I had exactly the same issue, it's commonly called "ghost songs" and it still exists in iOS 10.x There was no way to remove these songs using iTunes (I could deleted them there but on next sync they were just back) or any delete function on the phone itself (I deleted all music on the phone, but iTunes kept showing the ghost songs while the phone said there are no songs on the phone).

Here is how I was able to fix it:


Be sure to have a restorable backup of your iPhone content!
Download iFunbox
Kill the Music App on your iPhone
Connect your iPhone to your computer
Make sure iTunes is not running
Start iFunbox
Choose Raw File System
Delete the following files and folders:


Downloads
iTunes Control &gt; Sync &gt; Media
iTunes Control &gt; Music
iTunes Control &gt; iTunes &gt; MediaLibrary.sqlitedb
iTunes Control &gt; iTunes &gt; MediaLibrary.sqlitedb-shm
iTunes Control &gt; iTunes &gt; MediaLibrary.sqlitedb-wal

Unplug your iPhone
Reboot it the hard way: Press&amp;hold Home+Start button > 5 sec
 (do not power it off the normal way, which is pressing just Start button > 5 sec and then using the slider to power it off. I did that at first and then the ghost songs came back!)
Once rebooted, connect to your computer.
Open iTunes
Check all your sync settings are still set correctly
Sync


After that the ghost songs were gone.