Hyderabad to Hampi by train: There are a couple of Express trains connect Hospet with Hyderabad with Hospet.
Try Hyderabad-Kolhapur Express (Train No:11303 / 11304) which takes about 12 hours between Hospet and Hyderabad.
Another option is to go for the Triweekly Kacheguda-Hubli Express (Train No: 17603) and get down at Hospet Jn.
Secunderabad-Hubli Express (Train No:17320) travels to Hubli via Badami and Gadag. If you plan to cover Badami,Aihole, Pattadakal also as part of Hampi trip, take this train and get down at Badami.
You can not get a direct train from Badami to Hospet. But if you get down at Gadag Jn, it’s on the relatively busy Hubli-Hospet route.
Hyderabad to Hampi by Road:
Hyderabad to Hampi distance is about 370km , takes about 7-8 hours of drive with halts.
Hyderabad– 85Km ->Jadchelra– 18km –> Mehbubnagar– 105km–>Raichur–90km–>Sindhanur– 50km–>Gangawati– 6km–>Kampli–20km–>Kamalapur –4km–>Hampi
Hyderabad to Hampi by bus: KSRTC operates many daily services (about 7 hours travel time) from Hyderabad to Shimoga, via Hospet. Types range from Airavat (luxury Volvo bus) to Sarige type (express).
Check with SRE Travels. They operate daily overnight AC Sleeper bus (Volvo) service to Hospet from Hyderabad.
Bus drops you at Hospet bus station, from where you can board a local bus to Hampi or take an auto-rickshaw.
See also How to reach Hampi for other travel options.