Many RNA binding proteins (RBPs) bind specific RNA sequence motifs, but only a small fraction (∼15%-40%) of RBP motif occurrences are occupied in vivo. To determine which contextual features discriminate between bound and unbound motifs, we performed an in vitro binding assay using 12,000 mouse RNA sequences with the RBPs MBNL1 and RBFOX2. Surprisingly, the strength of binding to motif occurrences in vitro was significantly correlated with in vivo binding, developmental regulation, and evolutionary age of alternative splicing. Multiple lines of evidence indicate that the primary context effect that affects binding in vitro and in vivo is RNA secondary structure. Large-scale combinatorial mutagenesis of unfavorable sequence contexts revealed a consistent pattern whereby mutations that increased motif accessibility improved protein binding and regulatory activity. Our results indicate widespread inhibition of motif binding by local RNA secondary structure and suggest that mutations that alter sequence context commonly affect RBP binding and regulation.