The distance between Hoi An and Hue is ~120-160 km depending on the route. Below is the best route to get to Hue that avoids National Highway 1A as much as possible.
This route (~160 km) is longer than the main route via almost of National Highway 1A (~120 km), but it is more interesting. And more importantly, it is more safe for you.
After finishing Phuoc Tuong Tunnel – about 20 km to the north of Hai Van Pass (or Phuoc Tuong Pass if you would like to climb up to the pass again), turn-right to National Highway 49B. Ride along the small road to come to Tu Hien Bridge. Pass it and and continue the long road National Highway 49B along Thuan An Peninsula. It will bring you to Hue city centre.
Route: Hoi An > Da Nang (along the coast: Cua Dai st or Hai Ba Trung st > Lac Long Quan st > Truong Sa st > Vo Nguyen Giap st > Hoang Sa st > Le Duc Tho st > Nguyen Tat Thanh st > Nguyen Luong Bang st > Nguyen Van Cu st) > Hai Van Pass > Nguyen Van st (after finishing Hai Van Pass, along the river) > Phu Gia Pass (or Phu Gia Tunnel) > Phuoc Tuong Pass (or Phuoc Tuong Tunnel) > Highway 49B > Tu Hien Bridge (via Highway 49B) > Thuan An Peninsula (via Highway 49B) > Hue
Google Maps: https://goo.gl/maps/aKrGyniQ7WA2