The 1987 movie The Living Daylights is the first movie to feature Timothy Dalton in the role of James Bond. However, Dalton had been approached and offered the role of Bond twice before.
The first was On Her Majesty’s Secret Service, which Dalton declined as he felt he was too young for the role (he was 23 years old at the time), and he didn’t want to be the guy who replaced Sean Connery.
The second was For Your Eyes Only, since the current Bond actor at the time, Roger Moore, was considering quitting the series after Moonraker. Dalton was offered to be his replacement, but Moore would ultimately change his mind and stay on for more movies.