Neurotic New York film critic Allan Felix (Woody Allen) has just broken up with his wife, Nancy (Susan Anspach), causing him to spiral into a deep depression and look for solace in the classic movies that he loves, particularly the romantic saga 'Casablanca'. Allan begins to have conversations with the fantasy ghost of the film idol, Humphrey Bogart (Jerry Lacy), who gives him advice on romance and masculinity.
Allan's married friends, Linda and Dick (Diane Keaton, Tony Roberts), worry about their insecure and neurotic friend, pushing him to get on with his life and meet new women. This advice leads to a series of disastrously funny blind dates in which Allan attempts to follow the prosaic words of his idol, Bogart; he tries to act cool and macho but ends up only destroying his apartment and humiliating himself further. Allan's love life is going nowhere until his quest for romance leads him into the arms of his friend, Linda. As Allan's romance with Linda begins to get serious, he must decide whether he can betray his good friend and steal his wife or sacrifice his love for the good of his friends' marriage, in a tribute to the moral dilemma and finale of Bogart's 'Casablanca'.