William Maddock Bayliss, together with Ernest Starling, discovered peptides through their research on the gastrointestinal peptide secretin. In 1902, they identified secretin as the first known hormone. They found that secretin is secreted when food touches the small intestine and stimulates pancreatic juice secretion, which is crucial for digestion. This groundbreaking discovery opened up new avenues for medical and scientific research, leading to further advancements in understanding the role of peptides in the body.