The B738 is a somewhat roundabout route in the north of the Rhins of Galloway. It joins Dinvin (a kilometre or so northeast of the harbour village of Portpatrick on the Irish Sea coast of Wigtownshire) to Kirkcolm (on Loch Ryan), following an inverted-J-shaped route which passes through the communities of Portslogan, Knockain, and Ervie. On the way, it meets two B-roads – the B7043 and B798 – with southbound traffic on the B738 having to TOTSO at both junctions. It ends in Kirkcolm at an end-on junction with the A718 part way along the Main Street (as acknowledged by the signpost facing the end of Church Road).
In 1922 the road followed its present route from Dinvin to Kirkcolm, but it continued further south, making its end-to-end junction with the A718 at Craigencross, just east of Leswalt.
By 1932 the B738 had been truncated at both ends. The junction between the B738 and the A718 (still an end-to-end meeting) having been moved north to the Corsewall Point turn (the B738 from Kirkcolm still TOTSOs here). Meanwhile the southern part of the route – from Dinvin as far as the junction with the Wigtownshire C10 (High Challoch Road from near Portslogan to Craigencross) – became the A764.
This state of affairs continued until at least the 1970s, when the route of the A764 reverted to Class II status and Dinvin once again became the starting-point of the B738. Later still, the last 2 km of the A718 north of Kirkcolm were also downgraded, giving the B738 its current length.