"Of the Coming of John" appears in W.E.B. DuBois' The Souls of Black Folk; Essays and Sketches. The story tells of John, a young African American, who is able to gain an education. Given that this is not typical, John finds himself at odds with the white community around him. Since the story takes place in a typical (for the time) southern community, John finds that his education is no match for the racism which surrounds him.
In regards to the final sentence of the story, "And the world whistled in his ears," many different things are happening. First, John has just been looking out over the sea, trying to drown out the sounds of the men coming for him. The sounds of the sea are melodious enough to succeed. Essentially, the sea here is personified. The sea whistles in John’s ear in order to silence the sound of the coming horses' hooves. In this sense, the sea acts as John's protector.
As the men approach, John sees the hatred and anger in the eyes of the white men. John also sees the "coiled twisted rope" and a storm "burst round him." Here, the term "storm" is used in two very different ways. First, the storm could refer the storm of men surrounding him. Second, given the whistling wind, one could infer that the weather is changing around John and the men. Therefore, the world whistling in his ears could refer to the men's attack on him or the coming of an actual storm.
In the end, readers can only assume what happens to John. The world whistling in his ears could refer to the fact that he has thrown himself into the sea to escape the men. One could also support that John turns to the sea in order to allow the sound of the sea to drown out his murder. In any case, John's life ends with the whispering of the world in his ears.