Sure, you can put dialogue in the very first line of a work of fiction. Anton Chekhov’s story "My Life" begins like this:
The director told me: "I only keep you out of respect for your esteemed father, otherwise you would have been sent flying out of here long ago."
"Guilt," a short story by Judy Budnitz, begins this way:
"What kind of son are you?" asks Aunt Fran.
Both these stories open with an exchange that defines the moment and the conflict. Budnitz’s story continues:
Aunt Nina says, "Your own flesh and blood!" "What your mother wouldn’t do for you . . ." Aunt Fran goes on. "She’d do anything for you, anything in the world."
"And now you won’t give just a little back. For shame," says Aunt Nina.
"Now I’m glad I didn’t have any children; it would hurt me too much if they grew up as hard and selfish as you!" Aunt Fran cries and shudders. The heat is stifling, but she pulls her sweater closer.
The reader learns the situation after these admonishments: Arnie’s mother has suffered a heart attack. Nothing can be done. She needs a heart transplant. Aunt Fran and Aunt Nina think Arnie should donate his heart. Opening with dialogue introduces conflict immediately. It also establishes a familiar scenario—a son not living up to expectations—before moving into more preposterous territory. The choice to start on dialogue places the emphasis on what is said, instead of where or why it’s said.
A quick look at the beginnings of a wide variety of stories, though, will reveal that starting with dialogue isn’t a common approach. Most fiction begins with narrative in order to ground the reader in a specific moment. Raymond Carver’s short story "Whoever was Using This Bed" is heavy on dialogue. It begins this way:
The call comes in the middle of the night, three in the morning, and it nearly scares us to death.
"Answer it, answer it!" my wife cries. "My God, who is it? Answer it!"
By situating the characters in place and time, the first line gives the reader the necessary context to understand the wife’s alarm.
Judy Budnitz takes this approach in her short story "Dog Days:"
The man in the dog suit whines outside the door.
"Again?" sighs my mother.
"Where’s my gun?" says my dad.
"We’ll take care of it this time," my older brothers say.
Without the first line of narrative, the reader wouldn’t see the implications in what each character says.
Whether you begin with dialogue or narrative, make sure the first line is an evocative invitation into the story.