Few pairs of cities have as strong or as old a rivalry as that between Edinburgh and Glasgow, but then how many cities are as close to each other, or as close and so different? A story from the early days of Scottish Television has a producer flattering a reluctant American celebrity by telling him he'll be seen "coast to coast", the joke being that the land between stretches all of 40 miles; and yet the truth is that the difference between these eastern and western cities can at times seem almost transcontinental. Townscape, accents, weather: a 40-minute train journey takes you to another world, where (going west) mothers call their children "weans" and not "bairns", and fish suppers get dowsed in vinegar instead of brown sauce. The rain will have come on just past Falkirk if you're travelling by train, and somewhere around Harthill service station on the M8 if you're taking the car. The advent of sunshine isn't guaranteed going in the opposite direction but is certainly more likely.

Loyalties are firm and tend to be exclusive. Robert Crawford, loving both cities, says he feels like a bigamist. Of course, he exaggerates. What he calls "a treasured rivalry" has been kept alive mainly by newspaper columns and comedians as a prejudice that dares speaks its name – "The best thing in Edinburgh is the Glasgow train" and so on – unlike other forms of local hatred that need to be buried in case fighting breaks out. The caricature of each place as painted by its rival can still claim some foundation in observable reality. On the one hand, Edinburgh is "east windy, west endy", preening and stand-offish. On the other, Glasgow is damp, half-ruined by a motorway and blighted by poverty. All that can be mutually agreed, at least by people in their right minds, is that Glasgow is the friendlier and Edinburgh the more strikingly beautiful place.

In his introduction, which is easily the most successful part of a wayward book, Crawford shows how the seesawing fortunes of the two cities established their contrasting natures. Pre-industrial Glasgow was by far the gentler town: "the cleanest and beautifullest, and best built city in Britain, London excepted," wrote the English spy Daniel Defoe in an age when Edinburgh householders were still emptying their chamber pots from high windows and stinking the city with excrement. The Treaty of Union closed Edinburgh's parliament and further reduced its role as a capital city (the royal court went south a century before) but did Glasgow nothing but good. England's North American colonies were suddenly accessible to Scottish traders; Glasgow faced west across the Atlantic; by the middle of the 18th century the slave economy of Virginia's tobacco estates had given Glasgow a prosperous merchant class, who sank some of their profits into other industries, at first cotton and then the new technologies of steam engineering, which by 1900, enabled Glasgow to think of itself as the workshop of the world. For a time Europe's fourth largest city, it grew to more than twice the size of Edinburgh, drawing migrants from all across Scotland as well as Ireland and England to live in vile conditions that would have been familiar to Edinburgh chamber-pot emptiers 300 years before.

As to Edinburgh, it built itself a splendid Georgian extension and grew a reputation for physically cleaner and less arduous industries such as publishing and the law. The writers and philosophers of the Scottish Enlightenment flourished here, so that in 1805 a native writer could claim that there was "probably no city in the world of the same extent in which so great a proportion of the inhabitants consist of well-informed persons". Edinburgh tended then to look down on its western rival as "provincial", but as the 19th century wore on it derived its self-importance increasingly from history rather than, as Glasgow did, contemporary scientific advances and technical achievements. Quite early on, in Crawford's nice phrase, the city learned "to mine its past". Glasgow may have had the tallest factory chimney in Europe, but there was no larger memorial to a writer anywhere in the world than Edinburgh's to the first great historical novelist, Sir Walter Scott. Proportionally to the size of each city's workforce, Edinburgh's professional class was three times as large – and, crucially, a more enduring influence on civic character than the now largely vanished skilled working class of the west.

Crawford describes the history of these differences well, but after an engaging and purposeful start his book meanders through Georgian Edinburgh and Victorian Glasgow in chapters that are too confusingly arranged and under-illustrated to be a guidebook for the history-interested visitor (for whom it seems half intended) and too quick and glancing to detain a resident. A second try would have helped quite a few of his sentences – "Rightly regarded as a bighearted city, Glasgow has several urban hearts" – and the non-sequitur is a favourite device.

Another shame is the book's imprisonment by a literary culture – Crawford is professor of English at St Andrews – that rarely allows it into economic and social history, or much into the present day. By sticking mainly to literature and his conceit of a "treasured rivalry", the author skimps on the bigger story, which is that Scotland has resumed its pre-imperial shape. The east is now more prosperous than the west and makes the political running. Glasgow's population has declined as Edinburgh's has grown and the two cities are now roughly equal. Four railway routes connect them – more than between any other cities in Britain and possibly the world – each with faster and more frequent services than ever. As houses are cheaper in Glasgow and its suburbs than in Edinburgh, and as there's more work in insurance than engineering, the morning commuter traffic flows west-east.

Anyone who loves Glasgow must surely fear for its conquest and annexation by the city where, as we all know, men and women drink tea with their little finger delicately cocked and sex is what they deliver the coal in.