Sir Rankin explained to fans he had attempted to check in 48 hours before, but received an error message from the airline, and was told to complete the process at the airport.
He tweeted a similar message, which received a wave of support from fans’ criticism towards BA.
Broadcaster Terry Christian called the incident a “bad show indeed”.
“Airlines aren’t even particularly apologetic about this stuff either in my experience,” he added.
BA replied with an automated message on Twitter, saying: “Hi there, Ian.
“We’re sorry to hear this has happened. Please, once you’ve completed your journey, DM us and we’d be happy to look into this further for you.
“We apologise for the inconvenience caused by this.”
BA told The Telegraph they were not able to comment on individual cases without the details and permission to do so from the customer.
A spokesman added: “We do our best to avoid disrupting customer journeys by using historical data to match the number of available seats to the number of customers we expect to travel, but on rare occasions, we get this wrong. We’re sorry for our customer’s experience.”
Sir Rankin is best known for his crime series about Inspector Rebus, the main character in 26 of his novels, the first of which was published in 1987.
He was knighted by the Princess Royal at Buckingham Palace in June.